-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initialization and webpack #10
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,3 +86,12 @@ if ('serviceWorker' in navigator) { | |
}) | ||
} | ||
``` | ||
### Installation and testing | ||
|
||
* Clone the repo from here | ||
* cd to ipfs-service-worker | ||
* npm install | ||
* cd examples | ||
* npm run build | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is necessary a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand this, I am running npm install prior to the build, in the ipfs-service-worker. To be honest, I think this example is much too complicated to be useful, though it helped me figure out how to do it myself. The example is completely unclear what "use-from-another-page" means and in my own implementation I've simplified it significantly to a single package.json, and a single webpack.config.js at the same level which builds the bundles in the dist directory. I can't post that as a PR since its launching our own code (which includes IPFS) as the SW, rather than just IPFS. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with you that the example is pretty unclear. I believe it may be considered as an independent project, with its own dependencies. In this PR, there are still 2 package.json. This way, with the implementation in this PR, it needs the |
||
* cp -r public+sw/* dist/public+sw | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,8 @@ | |
"main": "src/index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build": "webpack" | ||
"build": "webpack", | ||
"builddev": "webpack -w --mode development", | ||
}, | ||
"author": "David Dias <[email protected]>", | ||
"license": "MIT", | ||
|
@@ -14,6 +15,6 @@ | |
}, | ||
"devDependencies": { | ||
"standard": "^10.0.3", | ||
"webpack": "^2.5.1" | ||
"webpack": "^4.2.0", | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you intended to write
examples/use-from-another-page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are correct