sparrow-packer
a compositive pack tool, support multi pages web project
Last updated 3 months ago by scrollbar .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install sparrow-packer 
SYNC missed versions from official npm registry.

sparrow-packer

web frone-end content pack tool, support multi-pages web app

powered by rollup & postcss

Installation

need javascript APIs:

npm i sparrow-packer

or take "-g" option to use the CLI tool

npm i sparrow-packer -g

CLI

run command in the source directory or the project directory that include "src" directory´╝îthis tool will try to find the source directory

localhost:src user-name$ sprpack
localhost:project-dir user-name$ sprpack

specify the source directory or the project directory

localhost:any-path user-name$ sprpack /Users/user-name/code/project-dir/src
localhost:any-path user-name$ sprpack /Users/user-name/code/project-dir

specify both the source directory and the target directory

localhost:any-path user-name$ sprpack /Users/user-name/code/project-dir/src /Users/user-name/code/project-dir/dist

specify relative directory

localhost:project-dir user-name$ sprpack src dist

specify a page

localhost:project-dir user-name$ sprpack src/index.html dist/index.html

specify a script entry

localhost:project-dir user-name$ sprpack src/index.js dist/app.js

specify a (post)css entry

localhost:project-dir user-name$ sprpack src/css/index.pcss dist/css/app.css

clean target directory

localhost:project-dir user-name$ sprpack src dist -c(lean)

pack and watch file changes

localhost:project-dir user-name$ sprpack src dist -w(atch)

Javascript APIs

const { join } = require('path')
const { pack } = require('../src')

const src = join(__dirname, 'src')
const dist = join(__dirname, 'dist')

pack(src, dist, {
  clean: true,
  watch: true,
  format: 'iife', // rollup module format, 'iife' by default
  uglify: true, // false by default,
  sourcemap: true // false by default
})

Current Tags

  • 0.4.22                                ...           latest (3 months ago)

42 Versions

  • 0.4.22                                ...           3 months ago
  • 0.4.20                                ...           3 months ago
  • 0.4.19                                ...           5 months ago
  • 0.4.18                                ...           5 months ago
  • 0.4.16                                ...           5 months ago
  • 0.4.15                                ...           5 months ago
  • 0.4.14                                ...           5 months ago
  • 0.4.13                                ...           7 months ago
  • 0.4.12                                ...           7 months ago
  • 0.4.11                                ...           7 months ago
  • 0.4.10                                ...           7 months ago
  • 0.4.9                                ...           7 months ago
  • 0.4.8                                ...           7 months ago
  • 0.4.7                                ...           7 months ago
  • 0.4.6                                ...           a year ago
  • 0.4.5                                ...           a year ago
  • 0.4.4                                ...           a year ago
  • 0.4.3                                ...           a year ago
  • 0.4.2                                ...           a year ago
  • 0.4.1                                ...           a year ago
  • 0.3.8                                ...           2 years ago
  • 0.3.7                                ...           2 years ago
  • 0.3.6                                ...           2 years ago
  • 0.3.5                                ...           2 years ago
  • 0.3.4                                ...           2 years ago
  • 0.3.3                                ...           2 years ago
  • 0.3.2                                ...           2 years ago
  • 0.3.1                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.6                                ...           2 years ago
  • 0.2.5                                ...           2 years ago
  • 0.2.4                                ...           2 years ago
  • 0.2.3                                ...           2 years ago
  • 0.2.2                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.5                                ...           2 years ago
  • 0.1.4                                ...           2 years ago
  • 0.1.3                                ...           2 years ago
  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 46
Last Day 0
Last Week 1
Last Month 12
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |