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
4f2db9fc82
commit
3d6037cd05
32
package.json
32
package.json
@ -1,35 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "frptools",
|
"name": "frptools",
|
||||||
"version": "3.0.1",
|
"version": "3.1.0",
|
||||||
"description": "Observable Property and Computed data streams",
|
"description": "Observable Property and Computed data streams",
|
||||||
"main": "lib/index.js",
|
"main": "src/index.js",
|
||||||
"jsnext:main": "src/index.js",
|
"files": ["src"],
|
||||||
"files": ["dist", "lib", "src"],
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rimraf dist lib",
|
"test": "node ../../bin/runTests.js ./"
|
||||||
"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/frptools.min.js dist/frptools.js",
|
|
||||||
"build:umd:gzip":
|
|
||||||
"npm run build:umd:min && gzip -c9 dist/frptools.min.js > dist/frptools.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",
|
|
||||||
"uglifyjs": "2.4.10"
|
|
||||||
},
|
},
|
||||||
"keywords": ["reactive"],
|
"keywords": ["reactive"],
|
||||||
"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-babel": "^2.7.1",
|
|
||||||
"rollup-plugin-json": "2.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: ['es2015-rollup']
|
|
||||||
};
|
|
||||||
|
|
||||||
export default {
|
|
||||||
entry: 'src/index.js',
|
|
||||||
moduleName: 'frptools',
|
|
||||||
plugins: [json(), babel(babelConfig)],
|
|
||||||
output: {
|
|
||||||
format: 'umd',
|
|
||||||
file: 'dist/frptools.js'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
const { prop, computed } = require('../lib/index.js');
|
import { prop, computed } from '../src/index.js';
|
||||||
const { dirtyMock, hashSet } = require('../lib/testUtil.js');
|
import { dirtyMock, hashSet } from '../src/testUtil.js';
|
||||||
|
|
||||||
describe('computed', () => {
|
describe('A computed', () => {
|
||||||
const add = (a, b) => a + b;
|
const add = (a, b) => a + b;
|
||||||
const square = a => a * a;
|
const square = a => a * a;
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
const { container, computed } = require('../lib/index.js');
|
import { container, computed } from '../src/index.js';
|
||||||
const { dirtyMock, hashSet } = require('../lib/testUtil.js');
|
import { dirtyMock, hashSet } from '../src/testUtil.js';
|
||||||
|
|
||||||
describe('A container', () => {
|
describe('A container', () => {
|
||||||
it('notifies dependents of updates', () => {
|
it('notifies dependents of updates', () => {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
const { prop } = require('../lib/index.js');
|
import { prop } from '../src/index.js';
|
||||||
const { dirtyMock, hashSet } = require('../lib/testUtil.js');
|
import { dirtyMock, hashSet } from '../src/testUtil.js';
|
||||||
|
|
||||||
describe('A property', () => {
|
describe('A property', () => {
|
||||||
it('returns its initialized value', () => {
|
it('returns its initialized value', () => {
|
||||||
|
|||||||
@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"spec_dir": "spec",
|
|
||||||
"spec_files": ["**/*[sS]pec.js"],
|
|
||||||
"helpers": ["helpers/**/*.js"],
|
|
||||||
"stopSpecOnExpectationFailure": false,
|
|
||||||
"random": false
|
|
||||||
}
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
export { prop } from './property';
|
export { prop } from './property.js';
|
||||||
export { computed } from './computed';
|
export { computed } from './computed.js';
|
||||||
export { container } from './container';
|
export { container } from './container.js';
|
||||||
export { call, id, pick } from './util.js';
|
export { call, id, pick } from './util.js';
|
||||||
|
|||||||
Reference in New Issue
Block a user