Remove ES5 compilation for libraries. Remove Node-based Jasmine tests. Tests run in Chromium headless mode.
(I got tired of Babel breaking every time I switched computers.)
This commit is contained in:
parent
9a9bbadacd
commit
463df71e77
@ -1,38 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "router",
|
"name": "router",
|
||||||
"version": "2.0.0",
|
"version": "2.1.0",
|
||||||
"description": "A slim and unopinionated router",
|
"description": "A slim and unopinionated router",
|
||||||
"main": "lib/index.js",
|
"main": "src/index.js",
|
||||||
"jsnext:main": "src/index.js",
|
"files": ["src"],
|
||||||
"files": ["dist", "lib", "src"],
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint src",
|
"test": "node ../../bin/runTests.js ./"
|
||||||
"clean": "rimraf dist lib",
|
|
||||||
"build:lib": "NODE_ENV=production babel src --presets=\"stage-0,es2015\" --out-dir lib",
|
|
||||||
"build:umd": "npm run build:lib && NODE_ENV=production rollup -c",
|
|
||||||
"build:umd:min":
|
|
||||||
"npm run build:umd && uglifyjs -m --screw-ie8 -c -o dist/router.min.js dist/router.js",
|
|
||||||
"build:umd:gzip": "npm run build:umd:min && gzip -c9 dist/router.min.js > dist/router.min.js.gz",
|
|
||||||
"build": "npm run build:umd:gzip && ls -l dist/",
|
|
||||||
"prepublish": "npm run clean && npm run build",
|
|
||||||
"test": "npm run build:lib && jasmine --verbose"
|
|
||||||
},
|
},
|
||||||
"keywords": ["router"],
|
"keywords": ["router"],
|
||||||
"author": "Timothy Farrell <tim@thecookiejar.me> (https://github.com/explorigin)",
|
"author": "Timothy Farrell <tim@thecookiejar.me> (https://github.com/explorigin)",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"devDependencies": {
|
|
||||||
"babel-cli": "6.18.0",
|
|
||||||
"babel-core": "6.21.0",
|
|
||||||
"babel-preset-es2015": "6.18.0",
|
|
||||||
"babel-preset-es2015-rollup": "3.0.0",
|
|
||||||
"babel-preset-stage-0": "6.16.0",
|
|
||||||
"jasmine": "^2.5.3",
|
|
||||||
"rimraf": "2.5.4",
|
|
||||||
"rollup-plugin-json": "2.1.0",
|
|
||||||
"rollup-plugin-babel": "^2.7.1",
|
|
||||||
"uglifyjs": "2.4.10"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"trimkit": "^1.0.2"
|
"trimkit": "^1.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,21 +0,0 @@
|
|||||||
import json from 'rollup-plugin-json';
|
|
||||||
import babel from 'rollup-plugin-babel';
|
|
||||||
|
|
||||||
const babelConfig = {
|
|
||||||
env: {
|
|
||||||
es6: true,
|
|
||||||
browser: true
|
|
||||||
},
|
|
||||||
plugins: [],
|
|
||||||
presets: ['stage-0', 'es2015-rollup']
|
|
||||||
};
|
|
||||||
|
|
||||||
export default {
|
|
||||||
entry: 'src/index.js',
|
|
||||||
moduleName: 'Router',
|
|
||||||
plugins: [json(), babel(babelConfig)],
|
|
||||||
output: {
|
|
||||||
format: 'umd',
|
|
||||||
file: 'dist/router.js'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
self = window = {
|
|
||||||
location: {}
|
|
||||||
};
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
const { Router } = require('../lib/index.js');
|
import { Router } from '../src/index.js';
|
||||||
|
|
||||||
describe('router.href builds urls', () => {
|
describe('router.href builds urls', () => {
|
||||||
const router = Router([
|
const router = Router([
|
||||||
|
|||||||
@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"spec_dir": "spec",
|
|
||||||
"spec_files": ["**/*[sS]pec.js"],
|
|
||||||
"helpers": ["helpers/**/*.js"],
|
|
||||||
"stopSpecOnExpectationFailure": false,
|
|
||||||
"random": false
|
|
||||||
}
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
import { isFunction, isUndefined, Null, ObjectKeys } from 'trimkit';
|
import { isFunction, isUndefined, Null, ObjectKeys } from '../node_modules/trimkit/src/index.js';
|
||||||
|
|
||||||
const VARMATCH_RE = /:([^\/]+)/g;
|
const VARMATCH_RE = /:([^\/]+)/g;
|
||||||
const ROUTEELEMENT_RE = /^[^\/]+$/;
|
const ROUTEELEMENT_RE = /^[^\/]+$/;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user