Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5 from KevinPy/develop
Browse files Browse the repository at this point in the history
2.3.0
  • Loading branch information
KevinPy authored Oct 24, 2017
2 parents 0374591 + eed32a8 commit d3ea773
Show file tree
Hide file tree
Showing 16 changed files with 75 additions and 476 deletions.
8 changes: 5 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
"node": true,
"browser": true
},
"ecmaFeatures": {
"jsx": true,
"modules": true
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"modules": true
}
},
"plugins": [
"react"
Expand Down
45 changes: 28 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "iceberg-bp",
"description": "Front-End Starter for your Web Projects with React, Webpack, Babel and SASS",
"version": "2.2.1",
"version": "2.3.0",
"author": "Kevin Py",
"license": "MIT",
"repository": {
Expand All @@ -12,41 +12,52 @@
"url": "https://github.com/KevinPy/Iceberg/issues"
},
"dependencies": {
"node-sass": "^4.5.2",
"normalize.css": "^7.0.0",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-router-dom": "^4.1.1"
},
"devDependencies": {
"babel-core": "^6.24.1",
"babel-eslint": "^8.0.1",
"babel-jest": "^21.2.0",
"babel-loader": "^7.0.0",
"babel-polyfill": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0",
"enzyme": "^3.1.0",
"enzyme-adapter-react-16": "^1.0.2",
"eslint": "^4.9.0",
"eslint-loader": "^1.7.1",
"eslint-plugin-react": "^7.4.0",
"extract-text-webpack-plugin": "^3.0.1",
"file-loader": "^1.1.5",
"html-webpack-plugin": "^2.28.0",
"node-sass": "^4.5.2",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-router-dom": "^4.1.1",
"identity-obj-proxy": "^3.0.0",
"jest": "^21.2.1",
"react-addons-test-utils": "^15.6.2",
"react-test-renderer": "^16.0.0",
"resolve-url-loader": "^2.0.2",
"sass-loader": "^6.0.3",
"style-loader": "^0.19.0",
"webpack": "^3.8.1",
"webpack-dev-server": "^2.4.2"
},
"devDependencies": {
"babel-jest": "^21.2.0",
"babel-polyfill": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"enzyme": "^3.1.0",
"enzyme-adapter-react-16": "^1.0.2",
"jest": "^21.2.1",
"react-addons-test-utils": "^15.6.2",
"react-test-renderer": "^16.0.0",
"webpack": "^3.8.1"
},
"scripts": {
"build": "webpack -p",
"start": "webpack-dev-server",
"test": "jest --setupTestFrameworkScriptFile=raf/polyfill"
},
"jest": {
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/src/app/js/fileTransform.js",
"\\.(css|scss)$": "identity-obj-proxy"
},
"testPathIgnorePatterns": [
"<rootDir>/node_modules/"
]
}
}
17 changes: 2 additions & 15 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,15 @@ Iceberg is built with React + Babel + Webpack + SASS. It's a solution for start
***
#### Installation
```
$ git clone git@github.com:KevinPy/Iceberg.git
$ git clone https://github.com/KevinPy/Iceberg.git
$ cd Iceberg
$ npm install
```
#### Scripts
`npm start` : Launch `webpack-dev-server` with Hot Module Replacement - http://localhost:8080<br />
`npm run build` : Compile **/src** folder and create **/dist** folder<br />
`npm run test` : Launch tests<br />
#### Structure
```
/src
|- /assets
|- /images
|- /styles
|- /main.scss
|- /js
|- components
|- App.jsx
|- NotFound.jsx
|- index.html
|- index.js
```

#### TODO
[x] Tests<br />
[x] ESLint<br />
Expand Down
5 changes: 4 additions & 1 deletion src/js/components/App.jsx → src/app/components/App/App.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import React, { Component } from 'react';
import './App.scss';

export default class App extends Component {
render() {
return (
<h1>It's Works !</h1>
<div className="App">
<h1>Welcome to Iceberg !</h1>
</div>
);
}
}
3 changes: 3 additions & 0 deletions src/app/components/App/App.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.App {

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import App from '../../src/js/components/App';
import App from './App';
import { shallow, configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

Expand All @@ -10,6 +10,6 @@ test('Get h1 content', () => {
<App/>
);
const expected = wrapper.find('h1').text();
const result = 'It\'s Works !';
const result = 'Welcome to Iceberg !';
expect(expected).toBe(result);
});
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import React, { Component } from 'react';
import './NotFound.scss';

export default class NotFound extends Component {
render() {
return (
<h1>Page not found !</h1>
<div className="NotFound">
<h1>Page not found !</h1>
</div>
);
}
}
3 changes: 3 additions & 0 deletions src/app/components/NotFound/NotFound.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.NotFound {

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import NotFound from '../../src/js/components/NotFound';
import NotFound from './NotFound';
import { shallow, configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

Expand Down
7 changes: 7 additions & 0 deletions src/assets/js/fileTransformer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const path = require('path');

module.exports = {
process(src, filename, config, options) {
return 'module.exports = ' + JSON.stringify(path.basename(filename)) + ';';
},
};
Loading

0 comments on commit d3ea773

Please sign in to comment.