deplo

2019-09-09 admin

deplo是什么

什么是deplo,Mini Node.js build system for my legacy apps

deplo使用教程帮助文档

deplo

deplo is a tiny build system aimed to be fast even on older machines.

Pros

  • simple and clean api tailored for common tasks
  • manual dependency tracking of files provides amazing speed of building

Cons

  • manual dependency tracking is cumbersome
  • Yet Another Build System

Installation

npm install deplo

Usage

var app = require('deplo')({
  target_dir: 'build/' // required by clean()
});

//
// plugins and transformers
//

var js = app.plugins.js;
var less = app.plugins.less;
var jsx = require('react-tools').transform;

//
// configure
//

app.use(js({
  target_dir: 'build/%env/js/',
  src_dir: 'src/js/',
  banner: '/* MIT License */\n',
  // hash env -> bool
  compress: {
    production: true 
  },
  transformers: {
    'HelloMessage.jsx': [jsx]
  }
}));

app.use(less({
  target_dir: 'build/%env/css/',
  src_dir: 'src/less/',
  banner: '/* MIT License */\n',
  // optional paths required by less parser
  paths: ['src/less/'],
  // hash env -> bool
  compress: {               
    production: true
  }
}));

//
// apps
//

// app1
app.js('app1.js', [
    'dep1.js',
    'app1.js'
]);

// app2
app.js('app2.js', [
    'HelloMessage.jsx', // jsx
    'dep1.js',
    'app2.js'
]);

// less
app.less('app.css', {
  main: 'app.less',
  images: {
    target_dir: 'images',
    src_dir: 'images'
  },
  deps: [
    'dep1.less'
  ]
});

// run
app.build('development', function (err) {
  if (err) throw err;
  app.watch();
});

Api

options

  • target dir: required

builder.use(plugin)

builder.build(env, callback)

  • env: list of env separated by ‘,’

Example

// build development AND production
app.build('development,production', function (err) {});

builder.watch()

Watch filesystem and rebuild on files changes.

Example

Run

node examples/deploFile.js

Copyright & License

Copyright ? 2014 Giulio Canti - Released under the MIT License.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-74678.html

文章标题:deplo

相关文章
pm2-deploy
pm2-deploy是什么 什么是pm2-deploy,Deployment system for PM2 pm2-deploy官网:官网 pm2-deployyabo88狗亚app仓库:yabo88狗亚app仓库 pm2-deploy下载地址:点此下载 点此下载2 pm...
2019-03-16
ember-cli-deploy-git
ember-cli-deploy-git是什么 什么是ember-cli-deploy-git,a deploy plugin for uploading to git, including GitHub Pages. ember-cli...
2019-03-30
ember-cli-deploy-progress
ember-cli-deploy-progress是什么 什么是ember-cli-deploy-progress,Flexible ascii progress bar (ember-cli-deploy fork incorporati...
2019-03-30
ember-cli-deploy-git-ci
ember-cli-deploy-git-ci是什么 什么是ember-cli-deploy-git-ci,An ember-cli-deploy plugin for managing git deploys in CI. ember-...
2019-03-30
ember-cli-deploy-build
ember-cli-deploy-build是什么 什么是ember-cli-deploy-build,A Build Plugin for ember-cli-deploy ember-cli-deploy-build官网:官网 emb...
2019-03-30
ember-cli-deploy
ember-cli-deploy是什么 什么是ember-cli-deploy,A deployment pipeline for ember-cli apps ember-cli-deploy官网:官网 ember-cli-deploy...
2019-03-30
do-deploy
do-deploy是什么 什么是do-deploy,Deploy DigitalOcean droplets easy based on your configuration do-deploy官网:官网 do-deployyabo88狗亚app仓库:yabo88狗亚app...
2019-04-02
ember-cli-deploy-git-ci
ember-cli-deploy-git-ci是什么 什么是ember-cli-deploy-git-ci,An ember-cli-deploy plugin for managing git deploys in CI. ember-...
2019-03-30
ember-cli-deploy-plugin
ember-cli-deploy-plugin是什么 什么是ember-cli-deploy-plugin,For building plugins for ember-cli-deploy ember-cli-deploy-plugin...
2019-03-30
fis3-deploy-encoding
fis3-deploy-encoding是什么 什么是fis3-deploy-encoding,fis3-deploy-encoding fis3-deploy-encoding官网:官网 fis3-deploy-encodingyabo88狗亚app仓库...
2019-04-26
回到顶部