🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

fetk

Package Overview
Dependencies
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetk

a cli tool with devServer、build、etc commands

latest
npmnpm
Version
0.5.10
Version published
Maintainers
2
Created
Source

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: '/',
  staticPath: 'static',
  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,
}

FAQs

Package last updated on 03 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts