Skip to content
This repository was archived by the owner on Sep 4, 2020. It is now read-only.

Commit 24bc9c5

Browse files
chore(build): setup dev workflow
1 parent 1df36fe commit 24bc9c5

File tree

4 files changed

+107
-5
lines changed

4 files changed

+107
-5
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,30 @@ If writes are made offline followed by a page refresh, the writes will be sent w
103103
- On reconnect, app updates with new Firebase data, and writes are sent to Firebase
104104
- Even while online, local data is used first when available which results in a faster load
105105

106+
## Contributing to AngularFire2 Offline
107+
108+
Pull requests are welcome! If you have a suggested enhancement, please [open an issue](https://github.com/adriancarriger/angularfire2-offline/issues/new). Thanks!
109+
110+
Here is how you can setup a development environment:
111+
112+
### Clone repo
113+
114+
1. `git clone https://github.com/adriancarriger/angularfire2-offline.git`
115+
2. `cd angularfire2-offline`
116+
117+
### Setup example
118+
119+
1. `cd examples/angular-cli`
120+
2. `yarn`
121+
3. `npm start`
122+
123+
### Setup development environment
124+
125+
1. Open a new shell/terminal
126+
2. `cd angularfire2-offline`
127+
3. `yarn`
128+
4. `npm run start-dev`
129+
106130
## License
107131

108132
angularfire2-offline is licensed under the MIT Open Source license. For more information, see the [LICENSE](LICENSE) file in this repository.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"commit": "npm run prepublish && npm test && git-cz",
1010
"prepublish": "ngc && npm run build",
1111
"build": "webpack && cp bundles/angularfire2-offline.umd.js bundles/index.js",
12-
"clean": "rimraf index.js ./*{.d.ts,offline.js,.metadata.json} ./{src,tests}/**/*.{d.ts,js,metadata.json}",
12+
"build-dev": "ngc -w -p tsconfig-dev.json && npm run build",
13+
"start-dev": "onchange '*.ts' 'src/**/*.ts' --initial -- npm run build-dev",
14+
"clean": "rimraf index.js ./*{.d.ts,offline.js,.metadata.json,map} ./{src,tests}/**/*.{d.ts,js,metadata.json,map}",
1315
"semantic-release": "semantic-release pre && npm publish --tag=next && semantic-release post"
1416
},
1517
"repository": {
@@ -72,6 +74,7 @@
7274
"karma-webpack": "1.8.0",
7375
"loader-utils": "0.2.16",
7476
"localforage": "1.5.0",
77+
"onchange": "^3.2.1",
7578
"reflect-metadata": "0.1.8",
7679
"rimraf": "^2.6.1",
7780
"rxjs": "5.0.3",

tsconfig-dev.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"compilerOptions": {
3+
"module": "es2015",
4+
"target": "es5",
5+
"emitDecoratorMetadata": true,
6+
"experimentalDecorators": true,
7+
"declaration": true,
8+
"moduleResolution": "node",
9+
"types": [
10+
"jasmine",
11+
"node"
12+
],
13+
"lib": ["es2015", "dom"],
14+
"baseUrl": "",
15+
"mapRoot": "./",
16+
"outDir": "./examples/angular-cli/node_modules/angularfire2-offline",
17+
"sourceMap": true,
18+
"typeRoots": [
19+
"../node_modules/@types"
20+
],
21+
"paths": {
22+
"@angular/*": ["../node_modules/@angular/*"]
23+
}
24+
},
25+
"files": [
26+
"index.ts",
27+
"angularfire2-offline.ts",
28+
"./src/database.ts",
29+
"tests/database.spec.ts"
30+
],
31+
"exclude": [
32+
"node_modules",
33+
"bundles"
34+
],
35+
"angularCompilerOptions": {
36+
"strictMetadataEmit": true,
37+
"skipTemplateCodegen": true
38+
}
39+
}

yarn.lock

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ arraybuffer.slice@0.0.6:
243243
version "0.0.6"
244244
resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz#f33b2159f0532a3f3107a272c0ccfbd1ad2979ca"
245245

246-
arrify@^1.0.0:
246+
arrify@^1.0.0, arrify@~1.0.1:
247247
version "1.0.1"
248248
resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
249249

@@ -626,7 +626,7 @@ chalk@1.1.3, chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1:
626626
strip-ansi "^3.0.0"
627627
supports-color "^2.0.0"
628628

629-
chokidar@^1.4.1, chokidar@^1.4.3:
629+
chokidar@^1.4.1, chokidar@^1.4.3, chokidar@~1.6.0:
630630
version "1.6.1"
631631
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.1.tgz#2f4447ab5e96e50fb3d789fd90d4c72e0e4c70c2"
632632
dependencies:
@@ -872,6 +872,13 @@ create-hmac@^1.1.0, create-hmac@^1.1.2:
872872
create-hash "^1.1.0"
873873
inherits "^2.0.1"
874874

875+
cross-spawn@~4.0.0:
876+
version "4.0.2"
877+
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41"
878+
dependencies:
879+
lru-cache "^4.0.1"
880+
which "^1.2.9"
881+
875882
cryptiles@2.x.x:
876883
version "2.0.5"
877884
resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8"
@@ -2503,6 +2510,13 @@ lru-cache@2.2.x:
25032510
version "2.2.4"
25042511
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.2.4.tgz#6c658619becf14031d0d0b594b16042ce4dc063d"
25052512

2513+
lru-cache@^4.0.1:
2514+
version "4.0.2"
2515+
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e"
2516+
dependencies:
2517+
pseudomap "^1.0.1"
2518+
yallist "^2.0.0"
2519+
25062520
map-obj@^1.0.0, map-obj@^1.0.1:
25072521
version "1.0.1"
25082522
resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"
@@ -2617,7 +2631,7 @@ minimist@0.0.8, minimist@~0.0.1:
26172631
version "0.0.8"
26182632
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
26192633

2620-
minimist@1.2.0, minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0:
2634+
minimist@1.2.0, minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0, minimist@~1.2.0:
26212635
version "1.2.0"
26222636
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
26232637

@@ -2856,6 +2870,16 @@ once@~1.3.0, once@~1.3.3:
28562870
dependencies:
28572871
wrappy "1"
28582872

2873+
onchange@^3.2.1:
2874+
version "3.2.1"
2875+
resolved "https://registry.yarnpkg.com/onchange/-/onchange-3.2.1.tgz#7669312c8a8f94d80b4595dc8abe5d119559f7e0"
2876+
dependencies:
2877+
arrify "~1.0.1"
2878+
chokidar "~1.6.0"
2879+
cross-spawn "~4.0.0"
2880+
minimist "~1.2.0"
2881+
tree-kill "~1.1.0"
2882+
28592883
onetime@^1.0.0:
28602884
version "1.1.0"
28612885
resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789"
@@ -3072,6 +3096,10 @@ prr@~0.0.0:
30723096
version "0.0.0"
30733097
resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a"
30743098

3099+
pseudomap@^1.0.1:
3100+
version "1.0.2"
3101+
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
3102+
30753103
public-encrypt@^4.0.0:
30763104
version "4.0.0"
30773105
resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6"
@@ -3909,6 +3937,10 @@ travis-deploy-once@1.0.0-node-0.10-support:
39093937
request-promise "^4.1.1"
39103938
travis-ci "^2.1.1"
39113939

3940+
tree-kill@~1.1.0:
3941+
version "1.1.0"
3942+
resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.1.0.tgz#c963dcf03722892ec59cba569e940b71954d1729"
3943+
39123944
trim-newlines@^1.0.0:
39133945
version "1.0.0"
39143946
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"
@@ -4184,7 +4216,7 @@ which-module@^1.0.0:
41844216
version "1.0.0"
41854217
resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f"
41864218

4187-
which@^1.1.1, which@^1.2.1:
4219+
which@^1.1.1, which@^1.2.1, which@^1.2.9:
41884220
version "1.2.12"
41894221
resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192"
41904222
dependencies:
@@ -4270,6 +4302,10 @@ y18n@^3.2.1:
42704302
version "3.2.1"
42714303
resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
42724304

4305+
yallist@^2.0.0:
4306+
version "2.1.2"
4307+
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
4308+
42734309
yargs-parser@^4.2.0:
42744310
version "4.2.1"
42754311
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c"

0 commit comments

Comments
 (0)