-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes #150 - migrate to terser over now unmaintained uglify, sets fo…
…undation for #134 - typescript migration
- Loading branch information
1 parent
d50caef
commit 88e4487
Showing
8 changed files
with
239 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ node_modules | |
package-lock.json | ||
yarn.lock | ||
.vscode | ||
.rpt2_cache | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
clearMocks: true, | ||
coveragePathIgnorePatterns: ['/node_modules/', '/test/'], | ||
moduleFileExtensions: ['ts', 'tsx', 'js', 'json', 'jsx'], | ||
testMatch: [ | ||
'**/__tests__/**/*.(js|ts)?(x)', | ||
'**/?(*.)+(spec|test).(js|ts)?(x)' | ||
], | ||
transform: { '.(ts|tsx|js|jsx)': 'ts-jest' } | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
declare namespace jest { | ||
interface Matchers<R> { | ||
toMatchDOM(modes: any): CustomMatcher; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,48 @@ | ||
{ | ||
"name": "superfine", | ||
"description": "Minimal view layer for creating declarative web user interfaces.", | ||
"version": "6.0.1", | ||
"main": "dist/superfine.js", | ||
"module": "src/index.js", | ||
"license": "MIT", | ||
"repository": "jorgebucaran/superfine", | ||
"types": "superfine.d.ts", | ||
"files": [ | ||
"src", | ||
"dist", | ||
"superfine.d.ts" | ||
], | ||
"author": "Jorge Bucaran", | ||
"description": "Minimal view layer for creating declarative web user interfaces.", | ||
"keywords": [ | ||
"superfine", | ||
"frontend", | ||
"virtual dom", | ||
"vdom" | ||
"superfine", | ||
"vdom", | ||
"virtual dom" | ||
], | ||
"repository": "jorgebucaran/superfine", | ||
"license": "MIT", | ||
"author": "Jorge Bucaran", | ||
"files": [ | ||
"dist" | ||
], | ||
"main": "dist/superfine.js", | ||
"module": "dist/superfine.mjs", | ||
"types": "dist/superfine.d.ts", | ||
"scripts": { | ||
"test": "jest --coverage --no-cache", | ||
"build": "npm run bundle && npm run minify", | ||
"bundle": "rollup -i src/index.js -o dist/superfine.js -m -f umd -n superfine", | ||
"minify": "uglifyjs dist/superfine.js -o dist/superfine.js -mc pure_funcs=['Object.defineProperty'] --source-map includeSources,url=superfine.js.map", | ||
"prepare": "npm run build", | ||
"release": "npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish" | ||
"prebuild": "del dist", | ||
"build": "rollup -c", | ||
"postbuild": "npm run test", | ||
"prepub": "npm run setup", | ||
"pub": "npm version patch", | ||
"postpub": "npm publish", | ||
"presetup": "git clean -fdX", | ||
"setup": "npm install", | ||
"postsetup": "npm run build", | ||
"start": "rollup -wc", | ||
"test": "jest --coverage --no-cache" | ||
}, | ||
"babel": { | ||
"presets": "env" | ||
"prettier": { | ||
"printWidth": 80, | ||
"semi": true, | ||
"singleQuote": true | ||
}, | ||
"devDependencies": { | ||
"babel-env": "2.4.1", | ||
"jest": "^23.3.0", | ||
"rollup": "^0.62.0", | ||
"uglify-js": "^3.4.3" | ||
"@types/jest": "^23.3.10", | ||
"del-cli": "1.1.0", | ||
"jest": "^23.6.0", | ||
"rollup": "^0.67.4", | ||
"rollup-plugin-terser": "3.0.0", | ||
"rollup-plugin-typescript2": "0.18.0", | ||
"ts-jest": "^23.10.5", | ||
"typescript": "^3.2.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const typescript = require('rollup-plugin-typescript2'); | ||
const terser = require('rollup-plugin-terser').terser; | ||
|
||
export default [ | ||
{ | ||
input: 'src/superfine.ts', | ||
output: { format: 'umd', file: 'dist/superfine.js', name: 'superfine' }, | ||
plugins: [ | ||
typescript({ | ||
tsconfigOverride: { | ||
compilerOptions: { target: 'es5' }, | ||
include: ['src'] | ||
} | ||
}), | ||
terser() | ||
] | ||
}, | ||
{ | ||
input: 'src/superfine.ts', | ||
output: { format: 'esm', file: 'dist/superfine.mjs' }, | ||
plugins: [typescript({ tsconfigOverride: { include: ['src'] } })] | ||
} | ||
]; |
Oops, something went wrong.