Skip to content

Commit

Permalink
Upgrade test & build processes
Browse files Browse the repository at this point in the history
  • Loading branch information
macie committed Jun 16, 2018
1 parent f7c3954 commit c46350f
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 43 deletions.
7 changes: 7 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"presets": ["env"],
"plugins": [
"babel-plugin-add-module-exports",
"transform-es2015-modules-umd"
]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
coverage/
node_modules/
.nyc_output/
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- nyc --reporter=lcov npm test
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
4 changes: 2 additions & 2 deletions dist/smallstache.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "smallstache",
"version": "0.4.5",
"version": "0.4.6",
"description": "Lightweight template engine similar to Mustache/Handlebars.",
"keywords": [
"smallstache",
Expand All @@ -11,21 +11,22 @@
"main": "dist/smallstache.js",
"scripts": {
"build": "npm run bundle && npm run compress",
"bundle": "mkdirp ./dist && babel --plugins babel-plugin-add-module-exports,transform-es2015-modules-umd ./src/Smallstache.js > ./dist/smallstache.js",
"compress": "cd ./dist && uglifyjs --compress --mangle --source-map=./smallstache.js.map -- ./smallstache.js > ./smallstache.min.js && cd ../",
"pretest": "mkdirp ./spec/src && node ./tools/test_loading_helper.js",
"test": "istanbul cover '-x ./spec/*.Spec.js' jasmine JASMINE_CONFIG_PATH=spec/jasmine.json",
"posttest": "rimraf ./spec/src"
"bundle": "mkdirp ./dist && babel ./src/Smallstache.js > ./dist/smallstache.js",
"compress": "cd ./dist && uglifyjs ./smallstache.js --compress --mangle --output smallstache.min.js --source-map \"filename='./smallstache.js.map',url='./smallstache.js.map'\" && cd ../",
"test": "jest --coverage"
},
"devDependencies": {
"babel-cli": "6.16.x",
"babel-cli": "6.26.x",
"babel-core": "6.26.x",
"babel-jest": "23.0.x",
"babel-plugin-add-module-exports": "0.2.x",
"babel-plugin-transform-es2015-modules-umd": "6.12.x",
"istanbul": "0.4.x",
"jasmine": "2.5.x",
"babel-plugin-transform-es2015-modules-umd": "6.24.x",
"babel-preset-env": "1.7.x",
"jest": "23.1.x",
"mkdirp": "0.5.x",
"rimraf": "2.5.x",
"uglify-js": "2.7.x"
"nyc": "12.0.x",
"regenerator-runtime": "0.11.x",
"uglify-js": "3.4.x"
},
"files": [
"dist"
Expand Down
11 changes: 0 additions & 11 deletions spec/jasmine.json

This file was deleted.

2 changes: 1 addition & 1 deletion spec/Smallstache.Spec.js → tests/Smallstache.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var Smallstache = require('./src/smallstache.js');
import Smallstache from '../src/Smallstache';

describe('A Smallstache', function() {
it('should take string source', function() {
Expand Down
17 changes: 0 additions & 17 deletions tools/test_loading_helper.js

This file was deleted.

0 comments on commit c46350f

Please # to comment.