quickstart
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "quickstart", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "CommonJS module compiler for node.js and browsers", | ||
@@ -5,0 +5,0 @@ "main": "./main.js", |
@@ -14,3 +14,3 @@ # [QuickStart](http://spotify.github.io/quickstart) | ||
### 1. Install QuickStart globally (for the cli) | ||
### Install QuickStart globally (for the cli) | ||
@@ -21,14 +21,37 @@ ``` | ||
### 2. Install QuickStart and plugins in your project | ||
### Add index.html, package.json for your application | ||
``` | ||
mkdir app | ||
cd app | ||
npm install quickstart some-quickstart-transform | ||
cd my-awesome-app | ||
``` | ||
### 3. Build a development QuickStart file. | ||
index.html | ||
```html | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Awesomeness</title> | ||
<script src="./quickstart.js"></script> | ||
</head> | ||
<body></body> | ||
</html> | ||
``` | ||
package.json | ||
```json | ||
{ | ||
"name": "my-awesome-app" | ||
} | ||
``` | ||
cd app | ||
### Install needed npm packages, QuickStart and plugins locally | ||
``` | ||
npm install underscore --save | ||
npm install quickstart some-quickstart-transform --save-dev | ||
``` | ||
### Build a development QuickStart file. | ||
``` | ||
quickstart --transforms some-quickstart-transform --self > quickstart.js | ||
@@ -42,11 +65,6 @@ ``` | ||
```html | ||
<script src="./quickstart.js"></script> | ||
``` | ||
### Deploy | ||
### 4. Deploy | ||
``` | ||
cd app | ||
quickstart > app.js | ||
quickstart --transforms some-quickstart-transform > awesome.js | ||
``` | ||
@@ -56,6 +74,6 @@ | ||
Now simply replace `quickstart.js` with `app.js` | ||
Now simply replace `quickstart.js` with `awesome.js` | ||
```html | ||
<script src="./app.js"></script> | ||
<script src="./awesome.js"></script> | ||
``` | ||
@@ -102,3 +120,3 @@ | ||
transforms: [], // which transforms to use, defaults to none | ||
processors: {}, // which processors to use for each file extension, defaults to none, except embedded ones such as .js and .json. | ||
parsers: {}, // which parsers to use for each file extension, defaults to none, except embedded ones such as .js and .json. | ||
compress: false, // optimize and mangle the ast and JavaScript output | ||
@@ -123,3 +141,3 @@ output: true, // generates the (compressed if {compress: true}) JavaScript output, defaults to true | ||
--transforms transformModule # which transforms to use | ||
--processors ext=processorModule # which processors to use | ||
--parsers ext=parserModule # which parsers to use | ||
--compress # optimize and mangle the ast and JavaScript output | ||
@@ -126,0 +144,0 @@ --output # generates the (compressed if `--compress` is set) JavaScript output, defaults to true |
@@ -118,2 +118,16 @@ /* jshint strict:false */ | ||
it('should handle absolute paths (windows)', function() { | ||
var paths = resolver._paths('C:\\Users\\username\\app\\node_modules\\package\\lib\\'); | ||
for (var i = 0, l = paths.length; i < l; i++) { | ||
expect(paths[i].substr(0, 2)).to.equal('C:'); | ||
} | ||
}); | ||
it('should handle absolute paths (unix)', function() { | ||
var paths = resolver._paths('/Users/username/app/node_modules/package/lib/'); | ||
for (var i = 0, l = paths.length; i < l; i++) { | ||
expect(paths[i].substr(0, 1)).to.equal('/'); | ||
} | ||
}); | ||
}); |
@@ -204,9 +204,10 @@ /* global -Promise*/ | ||
var parts = (path).split('/').slice(1, -1); | ||
var drive = new pathogen(path).drive; | ||
for (var i = parts.length, part; i; part = parts[i--]) { | ||
if (part === node_modules) continue; | ||
var dir = '/' + parts.slice(0, i).join('/') + '/'; | ||
var dir = drive + '/' + parts.slice(0, i).join('/') + '/'; | ||
paths.push(dir); | ||
} | ||
paths.push('/'); | ||
paths.push(drive + '/'); | ||
if (this.defaultPath) paths.push(this.defaultPath); | ||
@@ -213,0 +214,0 @@ return paths; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
178
89608
44
2304