-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from npolar/cleanup
ESLint
- Loading branch information
Showing
114 changed files
with
4,225 additions
and
419 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,20 +1,10 @@ | ||
#!/usr/bin/env bash | ||
before='//Auto-generated: DO NOT EDIT (see `bin/build-styles`) | ||
import { css } from "lit-element"; | ||
export default css`' | ||
after='`;' | ||
bin="./node_modules/.bin" | ||
dist="dist/@npolar/mdc" | ||
find ./src -name "*.scss" -not -name "_*" -print0 | while read -d $'\0' sassfile | ||
do | ||
cssfile=`echo ${sassfile} | sed -e 's/.scss/.css/' | sed -e 's/src\//dist\/@npolar\/mdc\/css\//'` | ||
cssjsfile=`echo ${sassfile} | sed -e 's/.scss/-scss.js/'` | ||
|
||
echo "Building ${sassfile} -> ${cssjsfile}" | ||
echo "Building ${sassfile} -> ${cssjsfile} [$cssfile]" | ||
./node_modules/material-components-web-components/scripts/sass-render/bin/sass-render.js -t tpl-export-scss -s ${sassfile} -o ${cssjsfile} | ||
mkdir -p `dirname $cssfile` | ||
css=`cat $sassfile \ | ||
| $bin/node-sass --omit-source-map-url --output-style=compressed --include-path=./node_modules:./src \ | ||
| $bin/postcss --use autoprefixer --no-map` | ||
echo $css > $cssfile; | ||
echo "$before$css$after" > $cssjsfile | ||
cat $cssjsfile | tail -n +2 | sed 's/`;$//' | sed 's/export default css`//' > $cssfile | ||
done |
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,12 +1,12 @@ | ||
#!/usr/bin/env sh | ||
dist=dist/@npolar/mdc | ||
asset=asset | ||
mkdir -p $dist | ||
rm $dist/* -rf | ||
|
||
# Web root | ||
cp ./asset/index.html dist/ | ||
cp ./asset/robots.txt dist/ | ||
cp ./asset/favicon.ico dist/ | ||
cp -f $asset/index.html dist/ | ||
cp -f $asset/favicon.ico dist/ | ||
cp -f $asset/robots.txt dist/ | ||
|
||
# Other assets into /@npolar/mdc | ||
cp -r ./asset/* $dist | ||
cp -r $asset/* $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,15 @@ | ||
#!/bin/bash | ||
rm -rf dist/* | ||
|
||
mkdir -p node_modules | ||
cd node_modules && rm -rf material-components-web-components | ||
git clone https://github.com/material-components/material-components-web-components | ||
cd - | ||
|
||
./bin/build-styles | ||
./bin/copy-assets | ||
|
||
# find node_modules/material-components-web-components/packages -name "*.ts" -not -name "_*" -not -name "*test.ts" -print0 | while read -d $'\0' ts | ||
# do | ||
# tsc $ts -t ES2019 -m es2015 --outDir _mwc | ||
# done |
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,44 +1,77 @@ | ||
{ | ||
"name": "@npolar/mdc", | ||
"version": "0.0.1-pre", | ||
"version": "0.10.0", | ||
"license": "MIT", | ||
"type": "module", | ||
"dependencies": { | ||
"@material/base": "4.0.0", | ||
"@material/card": "4.0.0", | ||
"@material/list": "4.0.0", | ||
"@material/mwc-base": "*", | ||
"@material/mwc-button": "*", | ||
"@material/mwc-fab": "*", | ||
"@material/mwc-icon": "*", | ||
"@material/mwc-icon-button": "*", | ||
"@material/mwc-icon-button-toggle": "*", | ||
"@material/mwc-textfield": "*", | ||
"@material/select": "*", | ||
"@material/touch-target": "*", | ||
"lit-element": "=2.2.1", | ||
"weightless": "=0.0.36" | ||
"@material/base": "=6.0.0-canary.35a32aaea.0", | ||
"@material/button": "=6.0.0-canary.35a32aaea.0", | ||
"@material/card": "=6.0.0-canary.35a32aaea.0", | ||
"@material/checkbox": "=6.0.0-canary.35a32aaea.0", | ||
"@material/chips": "=6.0.0-canary.35a32aaea.0", | ||
"@material/data-table": "=6.0.0-canary.35a32aaea.0", | ||
"@material/drawer": "=6.0.0-canary.35a32aaea.0", | ||
"@material/list": "=6.0.0-canary.35a32aaea.0", | ||
"@material/menu": "=6.0.0-canary.35a32aaea.0", | ||
"@material/mwc-base": "0.14.1", | ||
"@material/mwc-button": "0.14.1", | ||
"@material/mwc-dialog": "^0.17.2", | ||
"@material/mwc-drawer": "0.14.1", | ||
"@material/mwc-fab": "0.14.1", | ||
"@material/mwc-formfield": "0.14.1", | ||
"@material/mwc-icon": "0.14.1", | ||
"@material/mwc-icon-button": "0.14.1", | ||
"@material/mwc-icon-button-toggle": "0.14.1", | ||
"@material/mwc-list": "0.14.1", | ||
"@material/mwc-menu": "0.14.1", | ||
"@material/mwc-select": "0.14.1", | ||
"@material/mwc-slider": "0.14.1", | ||
"@material/mwc-snackbar": "0.14.1", | ||
"@material/mwc-switch": "0.14.1", | ||
"@material/mwc-tab-bar": "0.14.1", | ||
"@material/mwc-textarea": "0.14.1", | ||
"@material/mwc-textfield": "0.14.1", | ||
"@material/select": "=6.0.0-canary.35a32aaea.0", | ||
"@material/tab-bar": "=6.0.0-canary.35a32aaea.0", | ||
"@material/top-app-bar": "=6.0.0-canary.35a32aaea.0", | ||
"@material/touch-target": "=6.0.0-canary.35a32aaea.0", | ||
"@npolar/fetch-api": "https://github.com/npolar/fetch-api#v1.0.0", | ||
"@vaadin/router": "1.7.2", | ||
"lit-element": "2.3.1", | ||
"lit-translate": "1.2.1" | ||
}, | ||
"browserslist": [ | ||
"chrome 69" | ||
"chrome 73" | ||
], | ||
"devDependencies": { | ||
"autoprefixer": "^9", | ||
"eslint": "^7.11.0", | ||
"node-sass": "^4", | ||
"postcss-cli": "^6", | ||
"rollup": "^1.22", | ||
"rollup-plugin-eslint": "^7", | ||
"rollup-plugin-live-server": "^1", | ||
"rollup-plugin-node-resolve": "^5" | ||
"@rollup/plugin-commonjs": "=16.0.0", | ||
"@rollup/plugin-node-resolve": "=10.0.0", | ||
"autoprefixer": "=9.8.6", | ||
"command-line-args": "=5.1.1", | ||
"command-line-usage": "=6.1.0", | ||
"eslint": "=7.11.0", | ||
"node-sass-import": "=2.0.1", | ||
"postcss-cli": "=7.1.2", | ||
"rollup": "=2.33.3", | ||
"rollup-plugin-eslint": "=7.0.0", | ||
"rollup-plugin-filesize": "=9.0.2", | ||
"rollup-plugin-live-server": "=1.0.3", | ||
"rollup-plugin-terser": "=5.3.0", | ||
"sass": "=1.29.0" | ||
}, | ||
"scripts": { | ||
"dev": "yarn prebuild && yarn rollup -c -w", | ||
"prepare": "./bin/prepare", | ||
"eslint": "eslint src", | ||
"pretest": "yarn eslint", | ||
"test": "yarn build", | ||
"prebuild": "./bin/copy-assets && ./bin/build-styles", | ||
"build": "yarn rollup -c", | ||
"now": "yarn build && cp now.json dist/ && cd dist && now && cd -" | ||
"build-styles": "./bin/build-styles", | ||
"now": "cp now.json dist/ && cd src && now && cd -", | ||
"predev": "./bin/copy-assets", | ||
"dev": "yarn rollup -c -w", | ||
"prebuild": "./bin/copy-assets", | ||
"build": "yarn rollup -c" | ||
}, | ||
"vaadin": { | ||
"disableUsageStatistics": true | ||
} | ||
} |
Oops, something went wrong.