alien
Fe development tools
Last updated 5 years ago by purple.calm .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install alien 
SYNC missed versions from official npm registry.

Require

Installation

$ npm install alien -g

Quick Start

before we run the commands of alien, we should have a project first

create a project

(directory structure)

project
├─┬src
│ ├─┬scripts
│ │ └──...
│ └─┬styles
│   └──...
└─.config

you 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 server

server 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 DEV

pack

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 pack

result

project
├─┬dev(package directory)
│ ├─┬scripts
│ │ └──index@dev.js
│ └─┬styles
│   └──index@dev.css
├─┬src
│ ├─┬scripts
│ │ └──...
│ └─┬styles
│   └──...
└─.config

min

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 min

result

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
│   └──...
└─.config

sync

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 sync

we also run pack and sync together

$ alien pack && alien sync

help

Aha!

Current Tags

  • 0.2.5                                ...           latest (5 years ago)

18 Versions

  • 0.2.5                                ...           5 years ago
  • 0.2.3                                ...           5 years ago
  • 0.2.2                                ...           5 years ago
  • 0.2.1                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.9                                ...           5 years ago
  • 0.1.7                                ...           5 years ago
  • 0.1.6                                ...           6 years ago
  • 0.1.3                                ...           6 years ago
  • 0.1.2                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
  • 0.0.6                                ...           6 years ago
  • 0.0.5                                ...           6 years ago
  • 0.0.4                                ...           6 years ago
  • 0.0.3                                ...           6 years ago
  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (8)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |