Skip to content

Commit 1b21273

Browse files
authored
Merge pull request #23 from Lakitna/distribute-bundle
Distribute bundle
2 parents 0c7bd74 + a752fe2 commit 1b21273

27 files changed

+1780
-185
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
22
app
3+
dist

.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module.exports = {
99
"plugin:cypress/recommended",
1010
],
1111
"parserOptions": {
12+
"sourceType": "module",
1213
"ecmaVersion": 8
1314
},
1415
"env": {
@@ -49,6 +50,7 @@ module.exports = {
4950
"files": ["cypress/integration/**/*"],
5051
"rules": {
5152
"sonarjs/no-identical-functions": "warn",
53+
"no-invalid-this": "warn"
5254
},
5355
}],
5456
};

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,6 @@ typings/
6666

6767
# next.js build output
6868
.next
69+
70+
# Generated files
71+
dist

.travis.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
language: node_js
22
node_js:
3-
- "7"
43
- "8"
54
- "10"
5+
- "12"
6+
addons:
7+
apt:
8+
packages:
9+
# Ubuntu 16+ does not install this dependency by default, so we need to install it ourselves
10+
- libgconf-2-4
11+
cache:
12+
# Caches $HOME/.npm when npm ci is default script command
13+
# Caches node_modules in all other cases
14+
npm: true
15+
directories:
16+
# we also need to cache folder with Cypress binary
17+
- ~/.cache
618
script:
719
- npm run lint
8-
- npm test
20+
- npm run test:source
21+
- npm run bundle
22+
- npm run test:bundle

DEVELOP.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# How to develop
2+
3+
## Node version
4+
5+
Anything above Node 8
6+
7+
## Running tests
8+
9+
There are many ways to run tests. Here is a list
10+
11+
| Command | Headless | Starts server | Code under test |
12+
|---------|----------|---------------|-----------------|
13+
| `npm test` | :heavy_check_mark: | :heavy_check_mark: | Source files |
14+
| `npm run test:source` | :heavy_check_mark: | :heavy_check_mark: | Source files |
15+
| `npm run test:bundle` | :heavy_check_mark: | :heavy_check_mark: | Distribution bundle |
16+
| `npm run run:cypress` | :heavy_check_mark: | :x: | Source files |
17+
| `npm run run:cypress:source` | :heavy_check_mark: | :x: | Source files |
18+
| `npm run run:cypress:bundle` | :heavy_check_mark: | :x: | Distribution bundle |
19+
| `npm start` | :x: | :heavy_check_mark: | Source files |
20+
| `npm run start:source` | :x: | :heavy_check_mark: | Source files |
21+
| `npm run start:bundle` | :x: | :heavy_check_mark: | Distribution bundle |
22+
| `npm run start:cypress` | :x: | :x: | Source files |
23+
| `npm run start:cypress:source` | :x: | :x: | Source files |
24+
| `npm run start:cypress:bundle` | :x: | :x: | Distribution bundle |
25+
26+
For commands that don't start their own server you'll need to run `npm run start:server` in a second command line.
27+
28+
## Publishing
29+
30+
`npm publish` will run tests that have to pass before allowing you to publish.

cypress/support/index.js renamed to cypress/support/bundle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
// https://on.cypress.io/configuration
1414
// ***********************************************************
1515

16-
require('../../index');
16+
require('../../');

cypress/support/source.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// ***********************************************************
2+
// This example support/index.js is processed and
3+
// loaded automatically before your test files.
4+
//
5+
// This is a great place to put global configuration and
6+
// behavior that modifies Cypress.
7+
//
8+
// You can change the location of this file or turn off
9+
// automatically serving support files with the
10+
// 'supportFile' configuration option.
11+
//
12+
// You can read more here:
13+
// https://on.cypress.io/configuration
14+
// ***********************************************************
15+
16+
require('../../src');

index.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

index.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/index.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)