|
18 | 18 | ], |
19 | 19 | "actions": [ |
20 | 20 | "open('package.json')", |
21 | | - "set('{\n \"name\": \"coderoad-redux-js\",\n \"version\": \"0.1.0\",\n \"description\": \"Coderoad tutorial for using redux with raw javascript\",\n \"bugs\": {\n \"url\": \"https://github.com/shmck/coderoad-redux-js\"\n },\n \"license\": \"ISC\",\n \"author\": \"Shawn McKay <shawn.j.mckay@gmail.com>\",\n \"main\": \"index.js\",\n \"repository\": \"https://github.com/shmck/coderoad-redux-js\",\n \"scripts\": {\n \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n },\n \"config\": {\n \"language\": \"JS\",\n \"runner\": \"mocha-coderoad\"\n },\n \"dependencies\": {\n \"mocha-coderoad\": \"latest\"\n },\n \"devDependencies\": {\n \"babel-preset-es2015\": \"^6.9.0\",\n \"babel-preset-react\": \"^6.11.1\",\n \"babelify\": \"^7.3.0\",\n \"browser-sync\": \"^2.13.0\",\n \"concurrently\": \"^2.2.0\",\n \"npm-watch\": \"^0.1.5\"\n },\n \"watch\": {\n \"reload\": {\n \"patterns\": [\n \"src\"\n ],\n \"extensions\": \"js,jsx,css,html,scss\",\n \"ignore\": \"node_modules\",\n \"quiet\": false\n }\n },\n \"scripts\": {\n \"browserify\": \"browserify src/index.js --extension=.jsx -o dist/bundle.js -t [ babelify --presets [ es2015 react ] ]\",\n \"browsersync:reload\": \"browser-sync reload\",\n \"browsersync:start\": \"browser-sync start --server --files 'index.html dist/bundle.js'\",\n \"build\": \"npm run browserify\",\n \"reload\": \"npm run browserify && npm run browsersync:reload\",\n \"start\": \"concurrently --kill-others 'npm run build' 'npm run browsersync:start' 'npm run watch'\",\n \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\",\n \"watch\": \"npm-watch\",\n \"setup\": \"npm install && mkdir -p dist && npm i -g concurrently browser-sync && npm start\"\n }\n}\n')" |
| 21 | + "set('{\n \"name\": \"coderoad-redux-js\",\n \"version\": \"0.1.0\",\n \"description\": \"Coderoad tutorial for using redux with raw javascript\",\n \"bugs\": {\n \"url\": \"https://github.com/shmck/coderoad-redux-js\"\n },\n \"license\": \"ISC\",\n \"author\": \"Shawn McKay <shawn.j.mckay@gmail.com>\",\n \"main\": \"index.js\",\n \"repository\": \"https://github.com/shmck/coderoad-redux-js\",\n \"scripts\": {\n \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n },\n \"dependencies\": {\n \"mocha-coderoad\": \"latest\"\n },\n \"devDependencies\": {\n \"babel-preset-es2015\": \"^6.9.0\",\n \"babel-preset-react\": \"^6.11.1\",\n \"babelify\": \"^7.3.0\",\n \"browser-sync\": \"^2.13.0\",\n \"concurrently\": \"^2.2.0\",\n \"npm-watch\": \"^0.1.5\",\n \"coderoad-redux-js\": \"^0.1.0\"\n },\n \"watch\": {\n \"reload\": {\n \"patterns\": [\n \"src\"\n ],\n \"extensions\": \"js,jsx,css,html,scss\",\n \"ignore\": \"node_modules\",\n \"quiet\": false\n }\n },\n \"scripts\": {\n \"browserify\": \"browserify src/index.js --extension=.jsx -o dist/bundle.js -t [ babelify --presets [ es2015 react ] ]\",\n \"browsersync:reload\": \"browser-sync reload\",\n \"browsersync:start\": \"browser-sync start --server --files 'index.html dist/bundle.js'\",\n \"build\": \"npm run browserify\",\n \"reload\": \"npm run browserify && npm run browsersync:reload\",\n \"start\": \"concurrently --kill-others 'npm run build' 'npm run browsersync:start' 'npm run watch'\",\n \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\",\n \"watch\": \"npm-watch\",\n \"setup\": \"npm install && mkdir -p dist && npm i -g concurrently browser-sync && npm start\"\n }\n}\n')" |
22 | 22 | ] |
23 | 23 | } |
24 | 24 | ], |
25 | 25 | "onPageComplete":"Continue to start working with Redux" |
26 | 26 | }, |
27 | 27 | { |
28 | 28 | "title":"The Store", |
29 | | -"description":"The\"single source of truth\".", |
| 29 | +"description":"The\"single source of truth\".\n\n```js\nconst store = createStore(reducer, initialState);\n```", |
30 | 30 | "tasks": [ |
31 | 31 | { |
32 | | -"description":"write a function `divideOne` divides a number by 1", |
| 32 | +"description":"install Redux. Run `npm install redux`.", |
| 33 | +"actions": [ |
| 34 | +"open('index.js')" |
| 35 | + ], |
33 | 36 | "tests": [ |
34 | 37 | "02/01" |
35 | | - ], |
36 | | -"actions": [ |
37 | | -"open('page-02.js')", |
38 | | -"set('// divideOne\nfunction divideOne(x) {\n return ::>\n}\n')" |
39 | 38 | ] |
40 | 39 | }, |
41 | 40 | { |
42 | | -"description":"write a function `mutiplyone` that multiplies a number by 1", |
| 41 | +"description":"import { createStore } from 'redux';", |
43 | 42 | "tests": [ |
44 | 43 | "02/02" |
45 | | - ], |
46 | | -"actions": [ |
47 | | -"insert('\n// multiplyOne\nfunction multiplyOne(x) {\n return ::>\n}\n')" |
| 44 | + ] |
| 45 | + }, |
| 46 | + { |
| 47 | +"description":"create your first store and call it `store`. Use a simple\"reducer\" function for now, let's say `state => state`.", |
| 48 | +"tests": [ |
| 49 | +"02/03" |
| 50 | + ] |
| 51 | + }, |
| 52 | + { |
| 53 | +"description":"log your store to the console and have a look.", |
| 54 | +"tests": [ |
| 55 | +"02/04" |
48 | 56 | ] |
49 | 57 | } |
50 | 58 | ] |
|