Remove exercises that are not supported by Odin project

This commit is contained in:
billalp 2019-11-18 11:00:03 +00:00
parent 0f7adedbfb
commit 1ae8fad8e0
24 changed files with 0 additions and 6005 deletions

View File

@ -1,11 +0,0 @@
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

View File

@ -1,2 +0,0 @@
coverage
**/templates

View File

@ -1 +0,0 @@
* text=auto

View File

@ -1,2 +0,0 @@
node_modules
coverage

View File

@ -1,5 +0,0 @@
language: node_js
node_js:
- 7
- 6
- 4

View File

@ -1,9 +0,0 @@
{
"generator-node": {
"promptValues": {
"authorName": "Cody Loyd",
"authorEmail": "codyloyd@gmail.com",
"authorUrl": "codyloyd.com"
}
}
}

View File

@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2017 Cody Loyd <codyloyd@gmail.com> (codyloyd.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -1,36 +0,0 @@
# generator-exercise [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url]
> generates boilerplate for The Odin Project exercises
## Installation
First, install [Yeoman](http://yeoman.io) and generator-exercise using [npm](https://www.npmjs.com/) (we assume you have pre-installed [node.js](https://nodejs.org/)).
```bash
npm install -g yo
npm install -g generator-exercise
```
Then generate your new project:
```bash
yo exercise
```
## Getting To Know Yeoman
* Yeoman has a heart of gold.
* Yeoman is a person with feelings and opinions, but is very easy to work with.
* Yeoman can be too opinionated at times but is easily convinced not to be.
* Feel free to [learn more about Yeoman](http://yeoman.io/).
## License
MIT © [Cody Loyd](codyloyd.com)
[npm-image]: https://badge.fury.io/js/generator-exercise.svg
[npm-url]: https://npmjs.org/package/generator-exercise
[travis-image]: https://travis-ci.org/codyloyd/generator-exercise.svg?branch=master
[travis-url]: https://travis-ci.org/codyloyd/generator-exercise
[daviddm-image]: https://david-dm.org/codyloyd/generator-exercise.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/codyloyd/generator-exercise

View File

@ -1,41 +0,0 @@
'use strict';
const Generator = require('yeoman-generator');
const chalk = require('chalk');
const yosay = require('yosay');
module.exports = class extends Generator {
prompting() {
// Have Yeoman greet the user.
this.log(chalk.red('Let\'s do this'));
const prompts = [{
type: 'input',
name: 'title',
message: 'Enter the exercise title',
default: 'title'
}];
return this.prompt(prompts).then(props => {
// To access props later use this.props.someAnswer;
this.props = props;
});
}
writing() {
this.fs.copyTpl(
this.templatePath(`title.js`),
this.destinationPath(`${this.props.title}.js`),
{title: this.props.title}
);
this.fs.copyTpl(
this.templatePath(`title.spec.js`),
this.destinationPath(`${this.props.title}.spec.js`),
{title: this.props.title}
);
this.fs.copyTpl(
this.templatePath(`README.md`),
this.destinationPath(`README.md`),
{title: this.props.title}
);
}
};

View File

@ -1,2 +0,0 @@
# Exercise XX - <%= title %>

View File

@ -1 +0,0 @@
<%= title %>

View File

@ -1,5 +0,0 @@
let <%= title %> = function() {
}
module.exports = <%= title %>

View File

@ -1,8 +0,0 @@
let <%= title %> = require('./<%=title%>')
describe('<%=title%>', function() {
it('EDITME', function() {
expect(<%=title%>()).toEqual(' ');
});
});

File diff suppressed because it is too large Load Diff

View File

@ -1,51 +0,0 @@
{
"name": "generator-exercise",
"version": "0.0.0",
"description": "generates boilerplate for The Odin Project exercises",
"homepage": "theodinproject.com",
"author": {
"name": "Cody Loyd",
"email": "codyloyd@gmail.com",
"url": "codyloyd.com"
},
"files": [
"generators"
],
"main": "generators/index.js",
"keywords": [
"lame",
"yeoman-generator"
],
"devDependencies": {
"yeoman-test": "^1.6.0",
"yeoman-assert": "^3.0.0",
"nsp": "^2.6.3",
"eslint": "^4.1.0",
"eslint-config-xo-space": "^0.16.0",
"jest": "^19.0.2",
"jest-cli": "^20.0.0"
},
"dependencies": {
"chalk": "^1.1.3",
"extend": "^3.0.2",
"yeoman-generator": "^1.0.0",
"yosay": "^2.0.0"
},
"jest": {
"testEnvironment": "node"
},
"scripts": {
"prepublish": "nsp check",
"pretest": "eslint . --fix",
"test": "jest"
},
"eslintConfig": {
"extends": "xo-space",
"env": {
"jest": true,
"node": true
}
},
"repository": "git@github.com:TheOdinProject/javascript-exercises.git",
"license": "MIT"
}

View File

@ -1,10 +0,0 @@
This exercise is tricky and was removed from our recommendations because it mostly leverages regular expressions for the solution, and those aren't really taught at this point in our curriculum.
Leaving it here for posterity, or a good challenge for anyone that wants to give it a shot.
Pig Latin is a children's language that is intended to be confusing when spoken quickly. Your job for this exercise is to create a solution that takes the words given and
turns them into pig latin. Please see the following wikipedia page for details regarding the rules of Pig Latin:
https://en.wikipedia.org/wiki/Pig_Latin
The rules section will give the rules and the examples that are required to complete this exercise.

View File

@ -1,9 +0,0 @@
function translate() {
// body...
}
module.exports = {
translate
}

View File

@ -1,64 +0,0 @@
// Topics
// * modules
// * strings
// Pig Latin
// Pig Latin is a made-up children's language that's intended to be confusing. It obeys a few simple rules (below) but when it's spoken quickly it's really difficult for non-children (and non-native speakers) to understand.
// Rule 1: If a word begins with a vowel sound, add an "ay" sound to the end of the word.
// Rule 2: If a word begins with a consonant sound, move it to the end of the word, and then add an "ay" sound to the end of the word.
// (There are a few more rules for edge cases, and there are regional variants too, but that should be enough to understand the tests.)
// See https://en.wikipedia.org/wiki/Pig_Latin for more details.
const pigLatin = require("./pigLatin.js");
describe('#translate', function() {
it('translates a word beginning with a vowel', function() {
s = pigLatin.translate("apple");
expect(s).toEqual('appleay');
});
xit('translates a word beginning with a consonant', function() {
s = pigLatin.translate("banana");
expect(s).toEqual("ananabay");
});
xit('translates a word beginning with two consonants', function() {
s = pigLatin.translate("cherry");
expect(s).toEqual('errychay');
});
xit('translates two words', function() {
s = pigLatin.translate("eat pie");
expect(s).toEqual('eatay iepay');
});
xit('translates a word beginning with three consonants', function() {
expect(pigLatin.translate("three")).toEqual("eethray");
});
xit('counts "sch" as a single phoneme', function() {
s = pigLatin.translate("school");
expect(s).toEqual("oolschay");
});
xit('counts "qu" as a single phoneme', function() {
s = pigLatin.translate("quiet");
expect(s).toEqual("ietquay");
});
xit('counts "qu" as a consonant even when its preceded by a consonant', function() {
s = pigLatin.translate("square");
expect(s).toEqual("aresquay");
});
xit('translates many words', function() {
s = pigLatin.translate("the quick brown fox");
expect(s).toEqual("ethay ickquay ownbray oxfay");
});
});

View File

@ -1,14 +0,0 @@
This exercise is tricky and was removed from our recommendations because it mostly leverages regular expressions for the solution, and those aren't really taught at this point in our curriculum.
Leaving it here for posterity, or a good challenge for anyone that wants to give it a shot.
# Exercise XX - snakeCase
Convert phrases and words into snake case
> Snake case (or snake\_case) is the practice of writing compound words or phrases in which the elements are separated with one underscore character (\_) and no spaces, with each element's initial letter usually lowercased as in "foo\_bar"
```javascript
snakeCase('Hello, World!') // hello_world
snakeCase('snakeCase') // snake_case
```

View File

@ -1,5 +0,0 @@
const snakeCase = function() {
}
module.exports = snakeCase

View File

@ -1,23 +0,0 @@
const snakeCase = require('./snakeCase')
describe('snakeCase', function() {
it('works with simple lowercased phrases', function() {
expect(snakeCase('hello world')).toEqual('hello_world');
});
xit('works with Caps and punctuation', function() {
expect(snakeCase('Hello, World???')).toEqual('hello_world');
});
xit('works with longer phrases', function() {
expect(snakeCase('This is the song that never ends....')).toEqual('this_is_the_song_that_never_ends');
});
xit('works with camel case', function() {
expect(snakeCase('snakeCase')).toEqual('snake_case');
});
xit('works with kebab case', function() {
expect(snakeCase('snake-case')).toEqual('snake_case');
});
xit('works with WTF case', function() {
expect(snakeCase('SnAkE..CaSe..Is..AwEsOmE')).toEqual('snake_case_is_awesome');
});
});