npm style project setup

* All files were moved to the `src` directory, unchanged
* Parcel handles module resolution as well as transpilation via babel
* package.json, package-lock.json, and .gitignore were added
* Utilize crossplatform tools for build
This commit is contained in:
Kevin Raoofi 2020-10-05 19:11:22 -04:00
parent bf7f1126c3
commit 0cc8f4effe
16 changed files with 13035 additions and 0 deletions

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
.cache
dist
node_modules
web-ext-artifacts

13004
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

27
package.json Normal file
View file

@ -0,0 +1,27 @@
{
"name": "watch-on-lbry",
"version": "1.5.4",
"license": "GPL-3.0",
"scripts": {
"build:assets": "cpx 'src/**/*.{json,png}' dist/",
"watch:assets": "cpx --watch -v 'src/**/*.{json,png}' dist/",
"build:parcel": "cross-env NODE_ENV=production parcel build --no-source-maps 'src/scripts/*.{js,ts}' 'src/**/*.html'",
"watch:parcel": "parcel watch --no-hmr --no-source-maps 'src/scripts/*.{js,ts}' 'src/**/*.html'",
"build": "npm-run-all -l -p build:parcel build:assets",
"watch": "npm-run-all -l -p watch:parcel watch:assets",
"start:chrome": "web-ext run -t chromium --source-dir ./dist",
"start:firefox": "web-ext run --source-dir ./dist"
},
"browserslist": [
">1%",
"not ie > 0"
],
"dependencies": {},
"devDependencies": {
"cpx": "^1.5.0",
"cross-env": "^7.0.2",
"npm-run-all": "^4.1.5",
"parcel-bundler": "^1.12.4",
"web-ext": "^5.2.0"
}
}

View file

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB