Permalink
Browse files

Let's drop the ES6 directory

  • Loading branch information...
1 parent 8c9b7e9 commit 8d0af4511c6d487d48265456409b5f6ba4459698 @voter101 voter101 committed Nov 6, 2015
View
@@ -10,5 +10,5 @@ coverage
build/Release
node_modules
*.module-cache
-src/es6
+src
exercises
View
@@ -31,7 +31,7 @@ You can run a webserver and see your changes live in your web browser:
1. Work on the code found in the `exercises` directory and run the tests to see if you did everything right.
2. You need to do the exercises in the given order.
3. Try to not peek at the test files! They contain spoilers.
- 4. To run the tests, use `npm run test-es6`. To automatically run tests when your code changes, use `npm run watch`.
+ 4. To run the tests, use `npm run test`. To automatically run tests when your code changes, use `npm run watch`.
## Join our newsletter
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -33,7 +33,7 @@ var React = require("react");
// Hint: There are no tests for this extra task. You need to do them
// yourself. You can perform manual-testing (meh.)
// Or try to create your own tests.
-// Check out `test/es6/05-Challange-GroceryList.js` for tests to this part.
+// Check out `test/05-Challange-GroceryList.js` for tests to this part.
//
// Extra Task: Extract creation (`addGroceryItem`) of grocery to external service.
File renamed without changes.
View
@@ -4,11 +4,11 @@
"description": "React.js Koans",
"main": "index.js",
"scripts": {
- "compile": "babel exercises/es6 --out-dir src/es6 > /dev/null 2>&1",
+ "compile": "babel exercises --out-dir src > /dev/null 2>&1",
"setup": "npm install && ncp koans/ exercises/",
"start": "npm run compile > /dev/null 2>&1 && nodemon server.js",
- "test-es6": "npm run compile > /dev/null 2>&1 && mocha -b --compilers js:babel/register -r test/es6/helpers.js test/es6/**/*.js || true",
- "watch": "onchange exercises/es6/*.jsx -- npm run test-es6"
+ "test": "npm run compile > /dev/null 2>&1 && mocha -b --compilers js:babel/register -r test/helpers.js test/**/*.js || true",
+ "watch": "onchange exercises/*.jsx -- npm run test"
},
"repository": {
"type": "git",
View
No changes.
@@ -1,4 +1,4 @@
-import HelloWorld from '../../src/es6/01-HelloWorld.js';
+import HelloWorld from '../src/01-HelloWorld.js';
describe("01 - HelloWorld", () => {
var component;
@@ -1,4 +1,4 @@
-import PartiesList from '../../src/es6/02-PartiesList.js';
+import PartiesList from '../src/02-PartiesList.js';
describe("02 - Parties List", () => {
var component;
@@ -1,4 +1,4 @@
-import WhatsYourName from '../../src/es6/03-WhatsYourName.js';
+import WhatsYourName from '../src/03-WhatsYourName.js';
describe("03 - What's Your Name?", () => {
var component;
@@ -1,4 +1,4 @@
-import Answers from '../../src/es6/04-Quiz.js';
+import Answers from '../src/04-Quiz.js';
describe("04 - Quiz", () => {
it("Question #1", () => {
@@ -1,7 +1,7 @@
-import GroceryListPart1 from '../../src/es6/05-Challenge-GroceryList-part-1.js';
-import GroceryListPart2 from '../../src/es6/05-Challenge-GroceryList-part-2.js';
-import GroceryListPart3 from '../../src/es6/05-Challenge-GroceryList-part-3.js';
-import GroceryListPart4 from '../../src/es6/05-Challenge-GroceryList-part-4.js';
+import GroceryListPart1 from '../src/05-Challenge-GroceryList-part-1.js';
+import GroceryListPart2 from '../src/05-Challenge-GroceryList-part-2.js';
+import GroceryListPart3 from '../src/05-Challenge-GroceryList-part-3.js';
+import GroceryListPart4 from '../src/05-Challenge-GroceryList-part-4.js';
describe("05 - Challenge - Grocery List", () => {
var component;
@@ -1,4 +1,4 @@
-import renderNameComponent from '../../src/es6/06-RenderComponent.js';
+import renderNameComponent from '../src/06-RenderComponent.js';
describe("06 - RenderComponent", () => {
@@ -1,19 +1,19 @@
-import LifecycleMethodsComponent from '../../src/es6/07-LifecycleMethods.js';
+import LifecycleMethodsComponent from '../src/07-LifecycleMethods.js';
import sinon from 'sinon';
describe("07 - Lifecycle methods", () => {
var component;
describe("Task #1 - emit a console log when the component mounts", () => {
it("should emit 'I'm mounted!' in developer's console", () => {
- var mock = sinon.mock(console);
+ var mock = sinon.mock(console);
mock.expects("log").once().withArgs("I'm mounted!");
var rootNode = document.body.appendChild(document.createElement('div'));
React.render(React.createElement(LifecycleMethodsComponent), rootNode);
mock.verify();
});
- });
+ });
describe("Task #2 - emit a console log when the component updates", () => {
it("should emit 'Updated!' in developer's console", () => {
File renamed without changes.
View
@@ -1,2 +0,0 @@
-console.log("Run tests with `npm run test-es6`!");
-process.exit(1);
View
@@ -6,7 +6,7 @@ module.exports = {
entry: [
'webpack-dev-server/client?http://localhost:9090',
'webpack/hot/only-dev-server',
- './exercises/es6/main'
+ './exercises/main'
],
output: {
@@ -17,7 +17,7 @@ module.exports = {
module: {
loaders: [
- { test: path.join(__dirname, 'exercises/es6'), loaders: ['react-hot', 'babel-loader']}
+ { test: path.join(__dirname, 'exercises'), loaders: ['react-hot', 'babel-loader']}
]
},
@@ -29,4 +29,4 @@ module.exports = {
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
]
-}
+}

0 comments on commit 8d0af45

Please sign in to comment.