mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -05:00
build: don't trust webpack shell plugin, exclude large images
This commit is contained in:
parent
5b44a7747c
commit
2d3342af4b
6 changed files with 30 additions and 20 deletions
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -8739,12 +8739,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"webpack-shell-plugin": {
|
|
||||||
"version": "0.5.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/webpack-shell-plugin/-/webpack-shell-plugin-0.5.0.tgz",
|
|
||||||
"integrity": "sha1-Kbih2A3erg3bEOcpZn9yhlPCx0I=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"webpack-sources": {
|
"webpack-sources": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.0.1.tgz",
|
||||||
|
|
|
@ -21,11 +21,10 @@
|
||||||
"uglifyjs-webpack-plugin": "^1.0.0-rc.0",
|
"uglifyjs-webpack-plugin": "^1.0.0-rc.0",
|
||||||
"web-ext": "^1.8.1",
|
"web-ext": "^1.8.1",
|
||||||
"web-ext-types": "github:michael-zapata/web-ext-types",
|
"web-ext-types": "github:michael-zapata/web-ext-types",
|
||||||
"webpack": "^3.8.1",
|
"webpack": "^3.8.1"
|
||||||
"webpack-shell-plugin": "^0.5.0"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack",
|
"build": "scripts/build.sh",
|
||||||
"watch": "chokidar src scripts --initial --silent -i 'src/excmds_{background,content}.ts' -i 'src/static/docs' -c 'webpack --display errors-only'",
|
"watch": "chokidar src scripts --initial --silent -i 'src/excmds_{background,content}.ts' -i 'src/static/docs' -c 'webpack --display errors-only'",
|
||||||
"clean": "rm -rf build generated",
|
"clean": "rm -rf build generated",
|
||||||
"test": "npm run build && jest --silent",
|
"test": "npm run build && jest --silent",
|
||||||
|
|
13
scripts/build.sh
Executable file
13
scripts/build.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
PATH=$(npm bin):"$PATH"
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
mkdir -p generated/static
|
||||||
|
scripts/excmds_macros.py
|
||||||
|
scripts/newtab.md.sh
|
||||||
|
scripts/make_docs.sh &
|
||||||
|
|
||||||
|
webpack &
|
||||||
|
|
||||||
|
wait
|
|
@ -33,5 +33,9 @@ code {
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
max-width: 100%
|
max-width: 100%;
|
||||||
|
display: block;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
padding-top: .5em;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|

|
||||||
|
|
||||||
# Tridactyl new tab page
|
# Tridactyl new tab page
|
||||||
|
|
||||||
Tridactyl overrides your newtab page because it cannot insert its content script on the default about:newtab. Without the content script, our shortcuts won't work, even if you're just passing through the page.
|
Tridactyl overrides your newtab page because it cannot insert its content script on the default about:newtab. Without the content script, our shortcuts won't work, even if you're just passing through the page.
|
||||||
|
@ -38,5 +40,3 @@ If you want a more fully-featured vimperator-alike, your best option is Firefox
|
||||||
\[2]: https://github.com/cmcaine/tridactyl/blob/master/src/static/userChrome-minimal.css<br />
|
\[2]: https://github.com/cmcaine/tridactyl/blob/master/src/static/userChrome-minimal.css<br />
|
||||||
\[3]: https://www.mozilla.org/en-US/firefox/organizations/<br />
|
\[3]: https://www.mozilla.org/en-US/firefox/organizations/<br />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||

|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
|
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
|
||||||
const CopyWebPackPlugin = require('copy-webpack-plugin')
|
const CopyWebPackPlugin = require('copy-webpack-plugin')
|
||||||
const WebpackShellPlugin = require('webpack-shell-plugin')
|
// const WebpackShellPlugin = require('webpack-shell-plugin')
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: {
|
entry: {
|
||||||
|
@ -37,15 +37,15 @@ module.exports = {
|
||||||
// ecma: 8
|
// ecma: 8
|
||||||
// }
|
// }
|
||||||
// }),
|
// }),
|
||||||
new WebpackShellPlugin({onBuildStart: [
|
// new WebpackShellPlugin({onBuildStart: [
|
||||||
'mkdir -p generated/static',
|
// 'mkdir -p generated/static',
|
||||||
'scripts/excmds_macros.py',
|
// 'scripts/excmds_macros.py',
|
||||||
'scripts/newtab.md.sh',
|
// 'scripts/newtab.md.sh',
|
||||||
'scripts/make_docs.sh',
|
// 'scripts/make_docs.sh',
|
||||||
]}),
|
// ]}),
|
||||||
new CopyWebPackPlugin([
|
new CopyWebPackPlugin([
|
||||||
{ from: "src/manifest.json" },
|
{ from: "src/manifest.json" },
|
||||||
{ from: "src/static", to: "static" },
|
{ from: "src/static", to: "static", ignore: ['*.psd', '*1024px.png'] },
|
||||||
{ from: "generated/static", to: "static" },
|
{ from: "generated/static", to: "static" },
|
||||||
]),
|
]),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Reference in a new issue