You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 19, 2019. It is now read-only.
@@ -135,6 +154,9 @@ will win if it contains a `style` entry.
135
154
136
155
137
156
157
+
# Development
158
+
You can start a local development environment with `npm start`. This command starts a static file server on [localhost:8080](http://localhost:8080) which serves the examples in `examples/`. Hot-reload mechanisms are in place which means you don't have to refresh the page or restart the build for changes to take effect.
159
+
138
160
## Tests!
139
161
140
162
Run them:
@@ -146,13 +168,35 @@ Write them:
146
168
Check your work:
147
169
`npm run coverage`
148
170
149
-
## Publishing / Releasing
171
+
## Scripts
172
+
Run with `npm run <script>`.
173
+
174
+
### gh-pages
175
+
Builds the examples and assembles a commit which is pushed to `origin/gh-pages`, then cleans up your working directory. Note: This script will `git checkout master` before building.
176
+
177
+
### release
178
+
Takes the same argument as `npm publish`, i.e. `[major|minor|patch|x.x.x]`, then tags a new version, publishes, and pushes the version commit and tag to `origin/master`. Usage: `npm run release -- [major|minor|patch|x.x.x]`. Remember to update the CHANGELOG before releasing!
179
+
180
+
### build
181
+
Runs the build scripts detailed below.
182
+
183
+
### build:component
184
+
Transpiles the source in `lib/` and outputs it to `build/`, as well as creating a UMD bundle in `dist/`.
185
+
186
+
### build:examples
187
+
Creates bundles for each of the examples, which is used for pushing to `origin/gh-pages`.
188
+
189
+
### test
190
+
Runs the test scripts detailed below.
191
+
192
+
### test:lint
193
+
Runs `eslint` on the source.
194
+
195
+
### test:jest
196
+
Runs the unit tests with `jest`.
197
+
198
+
### coverage
199
+
Runs the unit tests and creates a code coverage report.
150
200
151
-
*`rackt build` (you probably need to temporarily delete/move `.babelrc`)
*`git commit CHANGELOG.md -m 'Update CHANGELOG with x.x.x release'`
156
-
*`npm version x.x.x`
157
-
*`npm publish`
158
-
*`git push origin/master --follow-tags`
201
+
### start
202
+
Builds all the examples and starts a static file server on [localhost:8080](http://localhost:8080). Any changes made to `lib/Autocomplete.js` and the examples are automatically compiled and transmitted to the browser, i.e. there's no need to refresh the page or restart the build during development. This script is the perfect companion when making changes to this repo, since you can use the examples as a test-bed for development.
0 commit comments