This repository has been archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b2f3cd
commit 2399c62
Showing
13 changed files
with
139 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "Scaffolding '$1'" | ||
|
||
cp -r ./template ../../exercises/concept/$1 | ||
|
||
echo "Template '$1' created for JS." | ||
cd ../../exercises/concept/$1 | ||
|
||
sed -i '' "s/---/$1/g" * | ||
|
||
mv concept-name.js $1.js | ||
mv concept-name.spec.js $1.js | ||
|
||
echo "Final directory:" && ls | ||
|
||
echo "Remember to fill out all details in every file!" |
5 changes: 5 additions & 0 deletions
5
languages/javascript/scripts/scaffold/template/.docs/after.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!-- | ||
This is the markdown file with the instructions for students to take after completing the challenge. | ||
See https://github.com/exercism/v3/blob/master/docs/concept-exercises.md#docsaftermd | ||
--> |
5 changes: 5 additions & 0 deletions
5
languages/javascript/scripts/scaffold/template/.docs/hints.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!-- | ||
This is the markdown file with the hints for students to use while completing this concept challenge. | ||
See https://github.com/exercism/v3/blob/master/docs/concept-exercises.md#docshintsmd | ||
--> |
5 changes: 5 additions & 0 deletions
5
languages/javascript/scripts/scaffold/template/.docs/instructions.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!-- | ||
This is the markdown file with the instructions on how to complete the exercise. | ||
See https://github.com/exercism/v3/blob/master/docs/concept-exercises.md#docsinstructionsmd | ||
--> |
5 changes: 5 additions & 0 deletions
5
languages/javascript/scripts/scaffold/template/.docs/introduction.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!-- | ||
This is the markdown file with the introduction to the concept and exercise. | ||
See https://github.com/exercism/v3/blob/master/docs/concept-exercises.md#docsintroductionmd | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"root": true, | ||
"parser": "babel-eslint", | ||
"parserOptions": { | ||
"ecmaVersion": 7, | ||
"sourceType": "module" | ||
}, | ||
"env": { | ||
"es6": true, | ||
"node": true, | ||
"jest": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:import/errors", | ||
"plugin:import/warnings" | ||
], | ||
"rules": { | ||
"linebreak-style": "off", | ||
|
||
"import/extensions": "off", | ||
"import/no-default-export": "off", | ||
"import/no-unresolved": "off", | ||
"import/prefer-default-export": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
yarn-error.log | ||
|
9 changes: 9 additions & 0 deletions
9
languages/javascript/scripts/scaffold/template/.meta/config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"authors": [ | ||
{ | ||
"github_username": "username", | ||
"exercism_username": "username" | ||
} | ||
], | ||
"forked_from": [] | ||
} |
14 changes: 14 additions & 0 deletions
14
languages/javascript/scripts/scaffold/template/babel.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
presets: [ | ||
[ | ||
'@babel/env', | ||
{ | ||
targets: { | ||
node: 'current', | ||
}, | ||
useBuiltIns: true, | ||
}, | ||
|
||
], | ||
], | ||
}; |
5 changes: 5 additions & 0 deletions
5
languages/javascript/scripts/scaffold/template/concept-name.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/* | ||
This is the stub implementation file, which is the starting point for students to work on the exercise. | ||
*/ |
5 changes: 5 additions & 0 deletions
5
languages/javascript/scripts/scaffold/template/concept-name.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/* | ||
This is the exercise's test suite. | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/* | ||
This is an example implementation that passes all the tests. | ||
*/ |
37 changes: 37 additions & 0 deletions
37
languages/javascript/scripts/scaffold/template/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"name": "@exercism/---", | ||
"description": "description", | ||
"author": "author", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"private": true, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/exercism/v3.git", | ||
"directory": "languages/javascript/exercises/concept/---" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.8.4", | ||
"@babel/core": "^7.9.6", | ||
"@babel/preset-env": "^7.9.6", | ||
"@types/jest": "^25.2.2", | ||
"@types/node": "^14.0.1", | ||
"babel-eslint": "^10.1.0", | ||
"babel-jest": "^26.0.1", | ||
"eslint": "^7.0.0", | ||
"eslint-plugin-import": "^2.20.2", | ||
"jest": "^26.0.1" | ||
}, | ||
"dependencies": {}, | ||
"jest": { | ||
"modulePathIgnorePatterns": [ | ||
"package.json" | ||
] | ||
}, | ||
"scripts": { | ||
"test": "jest --no-cache ./*", | ||
"watch": "jest --no-cache --watch ./*", | ||
"lint": "eslint .", | ||
"lint-test": "eslint . && jest --no-cache ./* " | ||
} | ||
} |