Skip to content

Commit b6dddac

Browse files
authored
Merge pull request #323 from commercetest/master
Improve README instructions and code snippets
2 parents c727017 + f2aecc7 commit b6dddac

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

readme.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ Please follow the instructions below to create a new directory and install the r
7474
mkdir sample
7575
cd sample
7676
npm init
77-
npm install webpack --save-dev
77+
npm install --save-dev webpack webpack-cli
7878
npm install spectorjs --save-dev
7979
```
8080

8181
Following the HelloWorld example from Webpack, you can now create it in the sample folder:
8282

83-
A js file named entry.js containing the following code:
83+
A js file named `entry.js` containing the following code:
8484

8585
```javascript
8686
var SPECTOR = require("spectorjs");
@@ -89,25 +89,25 @@ var spector = new SPECTOR.Spector();
8989
spector.displayUI();
9090
```
9191

92-
And an html file named index.js containing the following code:
92+
And an html file named `index.html` containing the following code:
9393

9494
```html
9595
<html>
9696
<head>
9797
</head>
9898
<body>
99-
<script type="text/javascript" src="bundle.js" charset="utf-8"></script>
99+
<script type="text/javascript" src="dist/main.js" charset="utf-8"></script>
100100
</body>
101101
</html>
102102
```
103103

104104
Now your application is ready. Go back to your command line and bundle the javascript file:
105105

106106
```
107-
webpack entry.js bundle.js
107+
npx webpack entry.js
108108
```
109109

110-
You are all set. You can open your index.html file and see the inspector running. It obviously won't be that usefull on an empty page but at least you get the integration idea.
110+
You are all set. You can open your `index.html` file and see the inspector running e.g. `open index.html` on Linux and macOS. It obviously won't be that useful on an empty page but at least you get the integration idea.
111111

112112
## Use as a Script Reference
113113
###### [Back to top](#table-of-content)

0 commit comments

Comments
 (0)