Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fe_devkit

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fe_devkit

a dev tool for fe development

  • 3.5.10
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

devkit

前端工程化工具。支持react,vue,es6,es5, 多页和单页应用。支持多项目开发。

basic usage

基本命令

// 适用于纯静态页,没有js的情况,或者使用es3, es5开发(不做babel语法转换)
$ npm start
$ npm run build
$ npm run buildCdn // 构建 并且上传cdn

// 适用于es6, vue, react开发,逐渐废弃,请使用后面的构建方式
$ npm startWp
$ npm run buildWp
$ npm run buildWpCdn // 构建 并且上传cdn

// 适用于es6, vue, react开发,完全基于webpack构建
$ npm run serve
$ npm run buildUp
$ npm run buildUp -- --cdn // 构建 并且上传cdn

// npm全局安装之后可以通过devkit命令操作
$ devkit new prj            // 新建项目 
$ devkit run serve prj      // 开发项目
$ devkit run buildUp prj    // 构建项目

basic options

  • src 项目名
  • cdn 是否上传cdn buildUp可用
  • stage 自定义环境参数(DEVKIT_STAGE) 可以和NODE_ENV搭配使用
  • mspeed 显示各步骤的耗费时间

oss.config.js (后面将替换为devkit.config.js,支持更加广泛的配置)

根目录下配置文件,目前可配oss参数,配合具体项目目录下的.congif.js使用

module.exports = {
    bucket: 'xxx',
    region: 'xxx',
    accessKeyId: 'xxx',
    accessKeySecret: 'xxx'
}

.config.js

当前项目配置文件

  • cdn: cdn相关配置

    可参考 webpack-aliyun-oss

    • from
    • dist
    • bucket
    • region
    • accessKeyId
    • accessKeySecret
    • setOssPath
    • setHeaders
    • test

    以下为cdn路径替换配置,仅针对基于gulp的构建可用, webpack构建使用output.publicPath代替

    • replace: {
    • js: cdnPrefix,
    • image: cdnPrefix,
    • css: cdnPrefix
    • }
  • gulpEvents: gulp事件配置,如: start,stop,err,task_start,task_stop,task_err,task_not_found,task_recursion

  • webpackConfig: webpack相关配置(覆盖默认配置)

FAQs

Package last updated on 27 Mar 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc