fetk
a cli tool with devServer、build、etc commands
Last updated 17 days ago by xqing9024 .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install fetk 
SYNC missed versions from official npm registry.

fetk

a cli tool with devServer、build、etc commands.

Install

$ npm i fetk -S

Commands

Options:

-v, --version  output the version number
-h, --help     output usage information
-c, --config   add the specified config,default fetk.config.js

Usage:

$ fetk run devServer run the app in development mode
$ fetk run build     build the app for production
$ fetk run lint      run eslint
$ fetk run compile   compiled into a library
$ fetk run dll       compiled into a dll library

Options

fetk.config.js

default options

const entry = {
  index: './src/index'
};
const defaultOptions = {
  webpackDevConfig: 'webpack.dev.config.js',
  webpackBuildConfig: 'webpack.build.config.js',
  webpackDllConfig: 'webpack.dll.config.js',
  webpackCompileConfig: 'webpack.compile.config.js',
  proxyConfig: 'proxy.config.js',
  devEntry: entry,
  buildEntry: entry,
  compileEntry: entry,
  dllEntry: entry,
  hmr: true,
  verbose: false,
  silent: true,
  host: '0.0.0.0',
  port: 8000,
  template: 'src/index.html',
  favicon: 'src/assets/favicon.png',
  publicPath: '/',
  output: '/dist',
  eslintFix: false,
  extraBabelPresets: [],
  extraBabelPlugins: [],
  babelOptions: [],
  devServer: {
    publicPath: '/',
    watchOptions: {
      ignored: /node_modules/,
    }
  }
}

Babel default options

{
  cacheDirectory: true,
  babelrc: false,
  presets: [
    require.resolve('@babel/preset-env'),
    require.resolve('@babel/preset-typescript'),
    require.resolve('@babel/preset-react'),
  ].concat(args.extraBabelPresets || []),
  plugins: [
    [require.resolve('@babel/plugin-proposal-decorators'), { legacy: true }],
    [require.resolve('@babel/plugin-proposal-class-properties'), { loose: true }],
    require.resolve('@babel/plugin-proposal-export-default-from'),
    require.resolve('@babel/plugin-proposal-export-namespace-from'),
    require.resolve('@babel/plugin-proposal-object-rest-spread'),
    require.resolve('@babel/plugin-transform-runtime'),
    ...args.hmr ? [require.resolve('react-hot-loader/babel')] : [],
  ].concat(args.extraBabelPlugins || []),
  ...args.babelOptions,
}

Current Tags

  • 0.2.4                                ...           latest (17 days ago)

8 Versions

  • 0.2.4                                ...           17 days ago
  • 0.2.3                                ...           a month ago
  • 0.2.2                                ...           a month ago
  • 0.2.1                                ...           a month ago
  • 0.2.0                                ...           3 months ago
  • 0.1.2                                ...           3 months ago
  • 0.1.1                                ...           4 months ago
  • 0.1.0                                ...           4 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 50
Dev Dependencies (14)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |