alien v0.2.5
Require
- rsync (http://rsync.samba.org/)
Installation
$ npm install alien -gQuick Start
before we run the commands of alien, we should have a project first
create a project
(directory structure)
project
├─┬src
│ ├─┬scripts
│ │ └──...
│ └─┬styles
│ └──...
└─.configyou can checkout (https://github.com/purplecalm/alien.git) to get a test case
start a server
before start server, make sure the working directory contains project
$ alien serverserver has three modes, SRC|DEV|PRD
- SRC: source mode, return every file, esay to debug
- DEV: package mode, return files' package
- PRD: product mode, return minified code
$ alien server -m DEVpack
packing exports files
(File .config) e.g
{
"exports": [
"scripts/index.js",
"styles/index.css"
]
}before run pack, make sure the project is working directory
$ alien packresult
project
├─┬dev(package directory)
│ ├─┬scripts
│ │ └──index@dev.js
│ └─┬styles
│ └──index@dev.css
├─┬src
│ ├─┬scripts
│ │ └──...
│ └─┬styles
│ └──...
└─.configmin
minify exports files
(File .config) e.g
{
"exports": [
"scripts/index.js",
"styles/index.css"
]
}before run min, make sure the project is working directory
$ alien minresult
project
├─┬prd(product directory)
│ ├─┬scripts
│ │ └──index@bc23723a6ebdd528a774264d37173293.js
│ └─┬styles
│ └──index@db47495f5329bd6a6df53228034d4746.css
├─┬ver(versions directory)
│ ├─┬scripts
│ │ └──index.js.ver (bc23723a6ebdd528a774264d37173293)
│ └─┬styles
│ └──index.css.ver (db47495f5329bd6a6df53228034d4746)
├─┬src
│ ├─┬scripts
│ │ └──...
│ └─┬styles
│ └──...
└─.configsync
sync all package to target server
make sure you installed rsync (find it here http://rsync.samba.org/)
set dev environment in .config (File .config) e.g
{
"dev": {
"host": "127.0.0.1",
"path": "/home/q/www/project/"
}
}before run sync
- make sure the project is working directory
- make sure you packed your project before
$ alien syncwe also run pack and sync together
$ alien pack && alien synchelp
Aha!10 years ago
10 years ago
10 years ago
10 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
