├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .postcssrc ├── .prettierignore ├── README.md ├── cssnano.config.js ├── index.html ├── index.js ├── package-lock.json ├── package.json └── prettier.config.js /.eslintignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /.vscode 3 | /.idea 4 | /.cache 5 | /.history 6 | /dist 7 | node_modules 8 | .DS_Store 9 | DS_Store? 10 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | es6: true, 4 | browser: true, 5 | node: true, 6 | }, 7 | extends: [], 8 | plugins: ['import', 'prettier'], 9 | parser: '@babel/eslint-parser', 10 | parserOptions: { 11 | ecmaVersion: 6, 12 | sourceType: 'module', 13 | ecmaFeatures: { 14 | jsx: true, 15 | }, 16 | }, 17 | rules: { 18 | 'prettier/prettier': ['error'], 19 | 'no-console': ['error', { allow: ['warn', 'error'] }], 20 | }, 21 | }; 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## IDE specific 2 | .idea/ 3 | .DS_Store 4 | DS_Store? 5 | .vscode/ 6 | 7 | ## Chores 8 | .eslintcache 9 | 10 | ## Building 11 | node_modules/ 12 | dist/ 13 | .cache 14 | .history 15 | npm-debug.log* 16 | yarn-debug.log* 17 | yarn-error.log* 18 | 19 | ## Other 20 | Desktop.ini 21 | Thumbs.db 22 | ._* 23 | tmp/ 24 | -------------------------------------------------------------------------------- /.postcssrc: -------------------------------------------------------------------------------- 1 | { 2 | "modules": true, 3 | "plugins": { 4 | "autoprefixer": { 5 | "grid": true 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /.vscode 3 | /.idea 4 | /.cache 5 | /.history 6 | /dist 7 | node_modules 8 | .DS_Store 9 | DS_Store? 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Framework 2 | 3 | A gradual FE JS framework development. 4 | 5 | ## End game 6 | 7 | Have a web app as a practical implementation 8 | of an application backed with a basic FE framework. 9 | 10 | Framework features: 11 | 12 | - components with props 13 | - html-like syntax 14 | - app state management 15 | - event handling 16 | - async network requests 17 | 18 | Out of scope: 19 | 20 | - reconciliation 21 | - app state persistency between sessions 22 | - everything else :) 23 | 24 | ## Development 25 | 26 | Make sure you have [Node.js](https://nodejs.org/en/) installed on your machine. 27 | 28 | `npm install` to install dependencies. 29 | Ignore npm audit warnings. 30 | If any changes appear on `package-lock.json` just commit those. 31 | 32 | `npm start` to launch dev server, app would be served at http://localhost:1234/ 33 | 34 | `npm run lint` to lint and prettify your code 35 | 36 | The project implements a pre-commit hook that launches staged files linting. 37 | If your IDE reports a commit failure then run `npm run lint` and/or `npm run lint:staged` 38 | and fix reported issues. Note that [`.eslintrc.js`](./.eslintrc.js) allows 39 | `console.error` and `console.warn`. 40 | 41 | `npm run build` to build production distribution package 42 | 43 | `npm run deploy` to publish built app 44 | -------------------------------------------------------------------------------- /cssnano.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: [ 3 | 'default', 4 | { 5 | calc: false, 6 | discardComments: { 7 | removeAll: true, 8 | }, 9 | }, 10 | ], 11 | }; 12 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 |