Skip to content

Commit

Permalink
still wip, but can work
Browse files Browse the repository at this point in the history
  • Loading branch information
dangreen committed Nov 28, 2018
1 parent 9725f70 commit 4082b60
Show file tree
Hide file tree
Showing 48 changed files with 10,313 additions and 423 deletions.
21 changes: 6 additions & 15 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
{
"exclude": "node_modules/**",
"presets": [
["@babel/preset-env", { "modules": false }],
["@babel/preset-stage-0", {
"decoratorsLegacy": true,
"pipelineProposal": "minimal"
}],
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-transform-runtime"
["babel-preset-trigen", {
"react": true
}]
],
"overrides": [{
"include": "scripts/**/*",
"presets": [
["@babel/preset-env", {
"targets": { "node": "current" }
}],
["@babel/preset-stage-0", {
"decoratorsLegacy": true,
"pipelineProposal": "minimal"
["babel-preset-trigen", {
"targets": { "node": "current" },
"commonjs": true
}]
]
}]
Expand Down
2 changes: 1 addition & 1 deletion .browserslistrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
extends browserslist-config-trigen
extends browserslist-config-trigen/browsers
3 changes: 0 additions & 3 deletions .env

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ node_modules
lib
package
build

.env
3 changes: 0 additions & 3 deletions .postcssrc

This file was deleted.

12 changes: 12 additions & 0 deletions .postcssrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const autoprefixer = require('autoprefixer');
const momentum = require('postcss-momentum-scrolling');

module.exports = () => ({
plugins: [
autoprefixer(),
momentum([
'scroll',
'auto'
])
]
});
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: node_js
node_js:
- "node"
cache:
directories:
- node_modules
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

# Weather

Architecture demo app.

## Basic commands

Start development server:
Expand All @@ -17,9 +19,19 @@ yarn build # or
npm run build
```

Test sources:
Run tests:

```bash
yarn test # or
npm test
```

## Environment variables

To be able to build this app, you should provide some environment variables:

```
OPENWEATHER_APPID=XXX
```

You can create `.env` in project root with this variables.
15 changes: 8 additions & 7 deletions jest.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
"moduleNameMapper": {
"~(.*)$": "<rootDir>/src/App/$1"
},
"collectCoverage": true,
"collectCoverageFrom": [
"src/**/*.{ts,tsx}",
Expand All @@ -24,13 +27,11 @@
"ts-jest": {
"babelConfig": {
"presets": [
["env", {
"targets": { "node": 6 }
}],
["stage-0"]
],
"plugins": [
"transform-runtime"
["babel-preset-trigen", {
"targets": { "node": "current" },
"commonjs": true,
"react": true
}]
]
}
}
Expand Down
89 changes: 44 additions & 45 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,80 +14,79 @@
},
"scripts": {
"generateDocs": "typedoc ./src --out ./docs --excludeExternals --mode modules; touch docs/.nojekyll",
"checkDeps": "npm-check -s; exit 0",
"lint:styles": "stylelint 'src/**/*.css'",
"lint:scripts": "tslint -p . -t stylish 'src/**/*.{ts,tsx}'",
"lint": "npm run lint:styles && npm run lint:scripts",
"jest": "NODE_ENV=test jest -c jest.config.json",
"test": "npm run checkDeps && npm run lint && npm run jest",
"test": "npm run lint && npm run jest && npm run build",
"start": "NODE_ENV=development babel-node scripts/webpackDevServer",
"build": "NODE_ENV=production babel-node scripts/webpackBuild",
"serve": "NODE_ENV=production babel-node scripts/startServer"
},
"dependencies": {
"@babel/runtime": "^7.0.0-beta.49",
"@types/prop-types": "^15.5.3",
"@babel/runtime": "^7.0.0",
"@flexis/redux": "^0.1.0-alpha",
"@stylable/runtime": "^0.1.8",
"@types/prop-types": "^15.5.5",
"@types/qs": "^6.5.1",
"@types/react": "16.4.6",
"@types/react": "16.4.13",
"@types/react-router-dom": "^4.3.1",
"axios": "^0.18.0",
"immutable": "4.0.0-rc.12",
"moment": "^2.22.2",
"prop-types": "^15.6.0",
"qs": "^6.5.2",
"react": "^16.3.1",
"react-dom": "^16.3.1"
"react": "^16.4.2",
"react-dom": "^16.4.2",
"react-loadable": "^5.5.0",
"react-router-dom": "^4.3.1",
"redux": "^4.0.0"
},
"devDependencies": {
"@babel/cli": "^7.0.0-beta.52",
"@babel/core": "^7.0.0-beta.49",
"@babel/node": "^7.0.0-beta.52",
"@babel/plugin-transform-runtime": "^7.0.0-beta.49",
"@babel/preset-env": "^7.0.0-beta.49",
"@babel/preset-react": "^7.0.0-beta.52",
"@babel/preset-stage-0": "^7.0.0-beta.49",
"@types/jest": "^23.1.3",
"autoprefixer": "^8.6.5",
"@babel/core": "^7.0.0",
"@babel/node": "^7.0.0",
"@stylable/core": "^0.1.10",
"@stylable/webpack-plugin": "^0.1.11",
"@types/jest": "^23.3.1",
"autoprefixer": "^9.1.3",
"awesome-typescript-loader": "^5.2.0",
"babel-core": "^6.23.1",
"babel-loader": "^8.0.0-beta",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.1.8",
"babel-preset-react": "^6.23.0",
"babel-preset-stage-0": "^6.22.0",
"browser-sync": "^2.18.13",
"browserslist-config-trigen": "^1.0.0",
"babel-loader": "^8.0.0",
"babel-preset-trigen": "^1.8.0",
"browser-sync": "^2.24.7",
"browserslist-config-trigen": "^1.1.0",
"clean-webpack-plugin": "^0.1.19",
"connect-history-api-fallback": "^1.5.0",
"dotenv": "^6.0.0",
"eslint": "^5.0.1",
"eslint-config-trigen": "^3.2.0",
"file-loader": "^1.1.11",
"eslint": "^5.4.0",
"eslint-config-trigen": "^3.2.1",
"eslint-loader": "^2.1.1",
"file-loader": "^2.0.0",
"html-webpack-plugin": "^3.2.0",
"http-proxy-middleware": "^0.18.0",
"http-proxy-middleware": "^0.19.0",
"humps": "^2.0.1",
"husky": "^1.0.0-rc.10",
"immutability-helper": "^2.1.1",
"jest": "^23.6.0",
"loader-utils": "^1.1.0",
"node-notifier": "*",
"npm-check": "^5.7.1",
"postcss": "^6.0.23",
"postcss-reporter": "^5.0.0",
"react-hot-loader": "4.3.3",
"postcss": "^7.0.2",
"postcss-momentum-scrolling": "^1.4.8",
"react-hot-loader": "4.3.5",
"service-worker-loader": "^2.1.0",
"stylable": "^5.4.10",
"stylable-webpack-plugin": "^1.1.6",
"stylelint": "^9.3.0",
"stylelint-config-trigen": "^2.0.1",
"svg-sprite-loader": "^3.2.3",
"stylelint": "^9.9.0",
"stylelint-config-trigen": "^2.0.2",
"stylelint-webpack-plugin": "^0.10.5",
"svg-sprite-loader": "^3.9.2",
"svgo": "^1.0.5",
"svgo-loader": "^2.1.0",
"ts-jest": "^23.0.0",
"tslint": "^5.10.0",
"tslint-config-trigen": "^3.0.5",
"ts-jest": "^23.1.4",
"tslint": "^5.11.0",
"tslint-config-trigen": "^3.0.7",
"tslint-loader": "^3.6.0",
"typedoc": "^0.11.1",
"typescript": "2.9.2",
"webpack": "^4.15.1",
"webpack-dev-middleware": "^3.1.3",
"webpack-hot-middleware": "^2.18.2"
"typedoc": "^0.13.0",
"typescript": "3.0.3",
"webpack": "^4.17.1",
"webpack-dev-middleware": "^3.2.0",
"webpack-hot-middleware": "^2.22.3"
}
}
1 change: 1 addition & 0 deletions scripts/configs/browserSync.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

export default {
server: 'build',
open: false,
notify: false,
logSnippet: false
Expand Down
Loading

0 comments on commit 4082b60

Please sign in to comment.