forked from urfu-2018/demo-task-2
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Sergey Gogolev
committed
Oct 4, 2016
1 parent
4a0aed0
commit 1d86d93
Showing
12 changed files
with
119 additions
and
1 deletion.
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,15 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_size = 4 | ||
indent_style = space | ||
trim_trailing_whitespace = true | ||
|
||
[*.json] | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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,8 @@ | ||
.DS_Store | ||
.git | ||
.idea | ||
|
||
*.log | ||
*.swp | ||
|
||
node_modules |
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,2 @@ | ||
save=true | ||
save-exact=true |
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 @@ | ||
{ | ||
"extends": "stylelint-config-hrundel" | ||
} |
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 @@ | ||
language: node_js | ||
node_js: | ||
- "6" |
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 |
---|---|---|
@@ -1 +1,14 @@ | ||
# demo-task-2 | ||
# Демонтстрационная задача «Пятый элемент» | ||
|
||
Перед выполнением задания внимательно прочитайте: | ||
|
||
- [О всех этапах проверки задания](https://github.com/urfu-2016/guides/blob/master/workflow/extra.md) | ||
- [Как отправить пулл](https://github.com/urfu-2016/guides/blob/master/workflow/pull.md) | ||
- [Как пройти тесты](https://github.com/urfu-2016/guides/blob/master/workflow/test.md) | ||
- Правила оформления [javascript](https://github.com/urfu-2016/guides/blob/master/codestyle/js.md), [HTML](https://github.com/urfu-2016/guides/blob/master/codestyle/html.md) и [CSS](https://github.com/urfu-2016/guides/blob/master/codestyle/css.md) кода | ||
|
||
## Основное задание | ||
|
||
Добавьте в HTML документ index.html __пять__ разных HTML элементов. | ||
|
||
<img width="590" alt="enot" src="https://cloud.githubusercontent.com/assets/4534405/19076552/b1b657ca-8a62-11e6-90c6-c84f12282f32.png"> |
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,11 @@ | ||
<!DOCTYPE html> | ||
<html lang="ru"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Пятый элемент</title> | ||
<link rel="stylesheet" href="index.css"> | ||
</head> | ||
<body> | ||
<!-- Здесь прикладывать основное усилие --> | ||
</body> | ||
</html> |
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 @@ | ||
{ | ||
"private": true, | ||
"scripts": { | ||
"test": "npm run lint && mocha ./node_modules/html-tests/task-stub/test", | ||
"lint": "stylelint *.css **/*.css" | ||
}, | ||
"dependencies": { | ||
"html-tests": "^1.0.0", | ||
"mocha": "3.0.2", | ||
"should": "11.1.0", | ||
"stylelint": "7.3.1", | ||
"stylelint-config-hrundel": "1.0.1" | ||
} | ||
} |
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,19 @@ | ||
/* global describe, it, global */ | ||
|
||
'use strict'; | ||
|
||
require('should'); | ||
var fs = require('fs'); | ||
var files = fs.readdirSync('.'); | ||
|
||
files = files.filter(file => { | ||
return fs.statSync(file).isFile() && /\.html$/.test(file); | ||
}); | ||
|
||
describe('Кол-во html файлов', function(){ | ||
it('Должен быть один html-файл в проекте', function () { | ||
files.length.should.be.eql(1); | ||
}); | ||
}); | ||
|
||
module.exports = fs.readFileSync(files[0], 'utf-8'); |
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 @@ | ||
'use strict'; | ||
var html = require('./getHtml'); | ||
|
||
var tags = []; | ||
|
||
html.match(/\<\s*[a-z]+/ig).forEach(function(tag){ | ||
tag = tag.replace('<', ''); | ||
|
||
if (tags.indexOf(tag) === -1) { | ||
tags.push(tag); | ||
} | ||
}); | ||
|
||
module.exports = tags; |
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,16 @@ | ||
/* global describe, it, global */ | ||
|
||
'use strict'; | ||
|
||
require('should'); | ||
|
||
var tags = require('./getUniqTags'); | ||
|
||
describe('Кол-во тегов.', function(){ | ||
it('Должно быть не менее уникальных 5 тегов.', function () { | ||
|
||
console.log(' Кол-во уникальных тегов: ' + tags.length); | ||
|
||
(tags.length >= 5).should.be.eql(true); | ||
}); | ||
}); |