Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
64135b77
Commit
64135b77
authored
Sep 04, 2019
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update webpack config to re-add the old `make watch`
parent
38919a35
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
19 deletions
+39
-19
Makefile
Makefile
+4
-3
package.json
package.json
+2
-1
webpack.common.js
webpack.common.js
+3
-0
webpack.dev.js
webpack.dev.js
+10
-13
webpack.prod.js
webpack.prod.js
+2
-2
webpack.serve.js
webpack.serve.js
+18
-0
No files found.
Makefile
View file @
64135b77
...
@@ -28,7 +28,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) ./doc
...
@@ -28,7 +28,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) ./doc
VERSION_FORMAT
=
[
0-9]+
\.
[
0-9]+
\.
[
0-9]+
VERSION_FORMAT
=
[
0-9]+
\.
[
0-9]+
\.
[
0-9]+
.PHONY
:
all
.PHONY
:
all
all
:
dev
dist
all
:
stamp-npm
dist
.PHONY
:
help
.PHONY
:
help
help
:
help
:
...
@@ -39,7 +39,7 @@ help:
...
@@ -39,7 +39,7 @@ help:
@
echo
" clean Remove all NPM packages."
@
echo
" clean Remove all NPM packages."
@
echo
" check Run all tests."
@
echo
" check Run all tests."
@
echo
" css Generate CSS from the Sass files."
@
echo
" css Generate CSS from the Sass files."
@
echo
" dev Set up the development environment. To force a fresh start, run 'make clean' first."
@
echo
" dev Set up the development environment
and start the webpack dev server
. To force a fresh start, run 'make clean' first."
@
echo
" html Make standalone HTML files of the documentation."
@
echo
" html Make standalone HTML files of the documentation."
@
echo
" po Generate gettext PO files for each i18n language."
@
echo
" po Generate gettext PO files for each i18n language."
@
echo
" pot Generate a gettext POT file to be used for translations."
@
echo
" pot Generate a gettext POT file to be used for translations."
...
@@ -120,6 +120,7 @@ clean:
...
@@ -120,6 +120,7 @@ clean:
.PHONY
:
dev
.PHONY
:
dev
dev
:
stamp-npm
dev
:
stamp-npm
npm dev
########################################################################
########################################################################
## Builds
## Builds
...
@@ -135,7 +136,7 @@ dist/website.min.css:: stamp-npm dist/website.css
...
@@ -135,7 +136,7 @@ dist/website.min.css:: stamp-npm dist/website.css
.PHONY
:
watch
.PHONY
:
watch
watch
:
stamp-npm
watch
:
stamp-npm
npm
start
npm
run watch
.PHONY
:
logo
.PHONY
:
logo
logo
:
logo/conversejs-transparent16.png
\
logo
:
logo/conversejs-transparent16.png
\
...
...
package.json
View file @
64135b77
...
@@ -15,12 +15,13 @@
...
@@ -15,12 +15,13 @@
"src/"
"src/"
],
],
"scripts"
:
{
"scripts"
:
{
"
start"
:
"webpack-dev-server --config webpack.dev
.js"
,
"
dev"
:
"webpack-dev-server --config webpack.serve
.js"
,
"clean"
:
"rm -rf node_modules stamp-npm dist *.zip"
,
"clean"
:
"rm -rf node_modules stamp-npm dist *.zip"
,
"converse-headless.js"
:
"webpack --mode=development --type=headless"
,
"converse-headless.js"
:
"webpack --mode=development --type=headless"
,
"converse-headless.min.js"
:
"npm run converse-headless.js && webpack --mode=production --type=headless"
,
"converse-headless.min.js"
:
"npm run converse-headless.js && webpack --mode=production --type=headless"
,
"nodeps"
:
"webpack --config webpack.nodeps.js"
,
"nodeps"
:
"webpack --config webpack.nodeps.js"
,
"build"
:
"webpack --config webpack.prod.js"
,
"build"
:
"webpack --config webpack.prod.js"
,
"watch"
:
"webpack --watch --config webpack.dev.js"
,
"lerna"
:
"lerna bootstrap --hoist --ignore-scripts"
,
"lerna"
:
"lerna bootstrap --hoist --ignore-scripts"
,
"prepare"
:
"npm run lerna && npm run build"
"prepare"
:
"npm run lerna && npm run build"
},
},
...
...
webpack.common.js
View file @
64135b77
...
@@ -9,6 +9,9 @@ const config = {
...
@@ -9,6 +9,9 @@ const config = {
externals
:
[{
externals
:
[{
"
window
"
:
"
window
"
"
window
"
:
"
window
"
}],
}],
watchOptions
:
{
ignored
:
[
/dist/
,
/spec/
,
/.*
\~
/
]
},
module
:
{
module
:
{
rules
:
[
rules
:
[
{
{
...
...
webpack.dev.js
View file @
64135b77
/* global module */
/* global module */
const
merge
=
require
(
"
webpack-merge
"
);
const
merge
=
require
(
"
webpack-merge
"
);
const
common
=
require
(
"
./webpack.common
.js
"
);
const
prod
=
require
(
"
./webpack.prod
.js
"
);
const
HTMLWebpackPlugin
=
require
(
'
html-webpack
-plugin
'
);
const
MiniCssExtractPlugin
=
require
(
'
mini-css-extract
-plugin
'
);
module
.
exports
=
merge
(
common
,
{
module
.
exports
=
merge
(
prod
,
{
mode
:
"
development
"
,
output
:
{
devtool
:
"
inline-source-map
"
,
filename
:
'
converse.js
'
,
devServer
:
{
contentBase
:
"
./dist
"
},
},
plugins
:
[
optimization
:
{
new
HTMLWebpackPlugin
({
minimize
:
false
,
title
:
'
Production
'
,
},
template
:
'
webpack.html
'
devtool
:
'
source-map
'
,
})
plugins
:
[
new
MiniCssExtractPlugin
({
filename
:
'
../dist/converse.css
'
})]
],
});
});
webpack.prod.js
View file @
64135b77
...
@@ -8,11 +8,11 @@ module.exports = merge(common, {
...
@@ -8,11 +8,11 @@ module.exports = merge(common, {
output
:
{
output
:
{
path
:
path
.
resolve
(
__dirname
,
'
dist
'
),
// Output path for generated bundles
path
:
path
.
resolve
(
__dirname
,
'
dist
'
),
// Output path for generated bundles
publicPath
:
'
/dist/
'
,
// URL base path for all assets
publicPath
:
'
/dist/
'
,
// URL base path for all assets
filename
:
'
converse.js
'
,
filename
:
'
converse.
min.
js
'
,
chunkFilename
:
'
[name].js
'
chunkFilename
:
'
[name].js
'
},
},
plugins
:
[
plugins
:
[
new
MiniCssExtractPlugin
({
filename
:
'
../dist/converse.css
'
})
new
MiniCssExtractPlugin
({
filename
:
'
../dist/converse.
min.
css
'
})
],
],
mode
:
"
production
"
,
mode
:
"
production
"
,
devtool
:
"
source-map
"
,
devtool
:
"
source-map
"
,
...
...
webpack.serve.js
0 → 100644
View file @
64135b77
/* global module */
const
merge
=
require
(
"
webpack-merge
"
);
const
common
=
require
(
"
./webpack.common.js
"
);
const
HTMLWebpackPlugin
=
require
(
'
html-webpack-plugin
'
);
module
.
exports
=
merge
(
common
,
{
mode
:
"
development
"
,
devtool
:
"
inline-source-map
"
,
devServer
:
{
contentBase
:
"
./dist
"
},
plugins
:
[
new
HTMLWebpackPlugin
({
title
:
'
Production
'
,
template
:
'
webpack.html
'
})
],
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment