Skip to content

Commit

Permalink
Build: new build workflow using Rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
zeh committed Dec 14, 2018
1 parent feed232 commit 542ddeb
Show file tree
Hide file tree
Showing 7 changed files with 4,386 additions and 138 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env"]
}
5 changes: 2 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
js-es5/* linguist-vendored
js-es6/* linguist-vendored
js-min/* linguist-vendored
dist/* linguist-vendored
test/* linguist-vendored
15 changes: 12 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
.tscache
node_modules
npm-debug.log
.tscache
.coveralls.yml
coverage
dist
node_modules
npm-debug.log
src/*.js
src/*.d.ts
yarn-error.log
_*.txt
_*.bat
.rpt2_cache
75 changes: 51 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,53 @@
{
"name": "fween-js",
"version": "1.0.0",
"description": "Fween animates things",
"repository": {
"type": "git",
"url": "https://github.com/zeh/fween-js.git"
},
"bugs": {
"url": "https://github.com/zeh/fween-js/issues"
},
"keywords": [
"animation",
"transitions",
"tweening",
"tween",
"tweener"
],
"author": "Zeh Fernando <npm@zehfernando.com> http://zehfernando.com",
"license": "MIT",
"homepage": "https://github.com/zeh/fween-js#readme",
"devDependencies": {
"tslint": "^5.11.0",
"typescript": "^3.2.2"
}
"name": "fween-js",
"version": "1.0.0",
"description": "Fween animates things",
"main": "./dist/Fween.umd.js",
"module": "./dist/Fween.es.js",
"types": "./src/Fween.d.ts",
"scripts": {
"build": "rimraf dist && rollup -c",
"build:declarations": "tsc -d",
"test": "jest --testMatch **/test/**/*-test-*.js",
"test:coverage": "npm run test -- --coverage",
"test:coverage:coveralls": "npm run test -- --coverage --coverageReporters=text-lcov | coveralls",
"test:watch": "npm run test -- --watchAll",
"lint": "tslint -c tslint.json src/*.ts",
"prepublish": "npm run build && npm run build:declarations"
},
"repository": {
"type": "git",
"url": "https://github.com/zeh/fween-js.git"
},
"bugs": {
"url": "https://github.com/zeh/fween-js/issues"
},
"keywords": [
"animation",
"transitions",
"tweening",
"tween",
"tweener"
],
"author": "Zeh Fernando <npm@zehfernando.com> http://zehfernando.com",
"license": "MIT",
"homepage": "https://github.com/zeh/fween-js#readme",
"devDependencies": {
"@babel/core": "^7.2.0",
"@babel/preset-env": "^7.2.0",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^23.6.0",
"jest": "^23.6.0",
"regenerator-runtime": "^0.13.1",
"rimraf": "^2.6.2",
"rollup": "^0.67.4",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-typescript": "^1.0.0",
"tslint": "^5.11.0",
"typescript": "^3.2.2"
},
"dependencies": {
"moremath": "^1.1.6",
"simplesignal": "^4.0.0"
}
}
23 changes: 23 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import typescript from "rollup-plugin-typescript";
import resolve from "rollup-plugin-node-resolve";
import pkg from "./package.json";

export default {
input: "src/Fween.ts",
output: [
{ name: "fween", sourcemap: true, file: pkg.module, format: "es" },
{
name: "Fween",
sourcemap: true,
file: pkg.main,
format: "umd",
footer: "module.exports.default = module.exports; // Terrible injection just so it works regardless of how it's required\n"
}
],
plugins: [
resolve(),
typescript({
typescript: require("typescript")
})
]
};
18 changes: 18 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"compilerOptions": {
"diagnostics": true,
"module": "es6",
"target": "es5",
"lib": ["dom", "es2015", "es2016", "es2017"],
"declaration": true,
"strict": true,
"removeComments": false,
"newLine": "LF"
},
"include": [
"src"
],
"exclude": [
"node_modules"
]
}
Loading

0 comments on commit 542ddeb

Please sign in to comment.