Skip to content

Commit

Permalink
Reinstate watch command (#1689)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanKingston committed Feb 6, 2023
1 parent 93a2890 commit 37eba30
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ Run the dev build task for your browser from the 'Build' section above. The gene

After running the build task it will continue watching for changes to any of the source files. After saving any changes to these files it will automatically rebuild the `dev` directory for you.

Note: If you wish to *not* monitor for changes please add watch=0 to your command such as `npm run dev-chrome -- watch=0`. This will require you to build other module changes yourself listed below.

### Locally testing changes to modules

The extension imports several DDG-owned modules (see [package.json](https://github.com/duckduckgo/duckduckgo-privacy-extension/blob/7a5616b5c54155a99f79c672e007785f76a8d3ee/package.json#L75-L78)). If you need to locally test changes to these modules follow these steps.
Expand Down
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ module.exports = function (grunt) {
let contentScopeInstall = 'echo "Skipping content-scope-scripts install";'
let contentScopeBuild = 'echo "Skipping content-scope-scripts build";'
// If we're watching the content scope files, regenerate them
if (grunt.option('watch')) {
if (Number(grunt.option('monitor'))) {
contentScopeInstall = `cd ${ddgContentScope} && npm install --legacy-peer-deps`
contentScopeBuild = `cd ${ddgContentScope} && npm run build && cd -`
}
Expand Down Expand Up @@ -288,7 +288,7 @@ module.exports = function (grunt) {
])

const devTasks = ['build']
if (grunt.option('watch')) {
if (Number(grunt.option('monitor'))) {
devTasks.push('watch')
}

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ grunt-dev:
mkdir -p build/$(browser)/dev/test/html
cp -r shared/img build/$(browser)/dev/test/html
cp -r shared/data build/$(browser)/dev/test/html
grunt dev --browser=$(browser) --type=$(type)
grunt dev --browser=$(browser) --type=$(type) --monitor=$(watch)

setup-artifacts-dir:
rm -rf integration-test/artifacts
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 37eba30

Please sign in to comment.