-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Reorganized * Adds travis * Adds build badge * More strict linting * Bump version of mithril * Sourcemaps only for watch, copy html to dist * Adds save and load for styles
- Loading branch information
1 parent
50720b7
commit ea99b12
Showing
22 changed files
with
334 additions
and
112 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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"sourceType": "module" | ||
}, | ||
"globals": { | ||
"m": false, | ||
"PIXI": false, | ||
"hljs": false, | ||
"saveAs": false | ||
}, | ||
"env": { | ||
"browser": true | ||
}, | ||
"rules": { | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"curly": [ | ||
"error", | ||
"all" | ||
], | ||
"brace-style": [ | ||
"error", | ||
"stroustrup", | ||
{ "allowSingleLine": false } | ||
], | ||
"indent": [ | ||
"error", | ||
4, | ||
{ "SwitchCase": 1 } | ||
], | ||
"eqeqeq": [ | ||
"error", | ||
"always" | ||
], | ||
"no-var": [ | ||
"error" | ||
], | ||
"no-console": [ | ||
"warn" | ||
], | ||
"no-trailing-spaces": [ | ||
"warn" | ||
] | ||
} | ||
} |
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,3 @@ | ||
dist | ||
*.log | ||
node_modules |
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,15 @@ | ||
language: node_js | ||
node_js: | ||
- "6" | ||
|
||
dist: trusty | ||
|
||
install: | ||
- npm install | ||
|
||
cache: | ||
directories: | ||
- node_modules | ||
|
||
script: | ||
- npm test |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,30 @@ | ||
{ | ||
"name": "pixi-text-style", | ||
"version": "1.0.0", | ||
"private": true, | ||
"main": "index.js", | ||
"scripts": { | ||
"clean": "rimraf dist/*", | ||
"prebuild": "npm run clean", | ||
"lintfix": "eslint --fix src", | ||
"build": "rollup -c", | ||
"watch": "rollup -c --watch --sourcemap", | ||
"test": "npm run build", | ||
"predeploy": "npm run build", | ||
"deploy": "gh-pages -d dist" | ||
}, | ||
"author": "Matt Karl <[email protected]>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"cssnano": "^3.10.0", | ||
"eslint": "^4.12.0", | ||
"gh-pages": "^1.1.0", | ||
"rimraf": "^2.6.2", | ||
"rollup": "^0.52.0", | ||
"rollup-plugin-buble": "^0.18.0", | ||
"rollup-plugin-copy": "^0.2.3", | ||
"rollup-plugin-eslint": "^4.0.0", | ||
"rollup-plugin-postcss": "^0.5.5", | ||
"rollup-plugin-uglify": "^2.0.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,44 @@ | ||
import buble from 'rollup-plugin-buble'; | ||
import uglify from 'rollup-plugin-uglify'; | ||
import postcss from 'rollup-plugin-postcss'; | ||
import eslint from 'rollup-plugin-eslint'; | ||
import copy from 'rollup-plugin-copy'; | ||
import cssnano from 'cssnano'; | ||
|
||
const sourcemap = process.argv.indexOf('--sourcemap') > -1; | ||
const compiled = (new Date()).toUTCString().replace(/GMT/g, 'UTC') | ||
|
||
export default { | ||
input: 'src/index.js', | ||
output: { | ||
format: 'iife', | ||
file: 'dist/bundle.js', | ||
sourcemap, | ||
banner: `/*! PixiJS TextStyle (${compiled}) */` | ||
}, | ||
plugins: [ | ||
copy({ | ||
'src/index.html': 'dist/index.html' | ||
}), | ||
eslint({ | ||
throwOnError: true, | ||
include: 'src/**.js' | ||
}), | ||
postcss({ | ||
plugins: [cssnano], | ||
sourceMap: sourcemap, | ||
extract: true | ||
}), | ||
buble(), | ||
uglify({ | ||
mangle: true, | ||
compress: true, | ||
output: { | ||
comments(node, comment) | ||
{ | ||
return comment.line === 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
4 changes: 2 additions & 2 deletions
4
js/components/StyleBackgroundColor.js → src/components/StyleBackgroundColor.js
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
Oops, something went wrong.