Skip to content

Commit

Permalink
add a few conferences
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanburgess committed Sep 9, 2017
1 parent d3802af commit 9b4fb3a
Show file tree
Hide file tree
Showing 5 changed files with 183 additions and 1 deletion.
35 changes: 34 additions & 1 deletion README.md
@@ -1 +1,34 @@
# 2018-conferences
# 2018 Web Development Conferences
A list of 2018 web development conferences.
A list of [2017 conferences](https://github.com/ryanburgess/2017-conferences).

# Conference List

## [AssertJS](https://www.assertjs.com/)
**Where:** San Antonio, TX

**When:** February 22, 2018

## [RenderConf](https://2018.render-conf.com/)
**Where:** Oxford, UK

**When:** March 23, 2018

## [ForwardJS Ottawa](https://forwardjs.com/ottawa)
**Where:** Ottawa, ON

**When:** April 3-6, 2018

## [FullStack](https://skillsmatter.com/conferences/9815-fullstack-2018-the-conference-on-javascript-node-and-internet-of-things)
**Where:** London, UK

**When:** July 11-13, 2018

## Contributing
1. Fork it
2. Add your conference to `list.json`
3. Run `node index to update` `README.md` with your changes
4. Create your feature branch (`git checkout -b my-new-feature`)
5. Commit your changes (`git commit -am "Add some feature"`)
6. Push to the branch (`git push origin my-new-feature`)
7. Create new Pull Request
25 changes: 25 additions & 0 deletions duplicates.js
@@ -0,0 +1,25 @@
'use strict';
const list = require('./list.json');
const items = [];
const duplicates = [];

Array.prototype.contains = function(obj) {
let i = this.length;
while (i--) {
if (this[i] == obj) {
return true;
}
}
return false;
}

for (let i = 0; i < list.length; i++){
const title = list[i].title;
if(!items.contains(title)){
items.push(title);
}else{
duplicates.push(title);
}
}
console.log(duplicates)

51 changes: 51 additions & 0 deletions index.js
@@ -0,0 +1,51 @@
'use strict';
const fs = require('fs');
const obj = require('./list.json');
const year = 2018;
let content = `# ${year} Web Development Conferences
A list of ${year} web development conferences.
A list of [${year - 1} conferences](https://github.com/ryanburgess/${year - 1}-conferences).
`;
// create contributing instructions
const contribute = `
## Contributing
1. Fork it
2. Add your conference to \`list.json\`
3. Run \`node index to update\` \`README.md\` with your changes
4. Create your feature branch (\`git checkout -b my-new-feature\`)
5. Commit your changes (\`git commit -am "Add some feature"\`)
6. Push to the branch (\`git push origin my-new-feature\`)
7. Create new Pull Request
`;

// create heading for conference list
content += `
# Conference List
`;

// format date
let formatDateYYYYMMDD = (_dateString) => {
let _d = new Date(_dateString);
return new Date(_d - _d.getTimezoneOffset() * 60 * 1000).toJSON().split(/T/)[0].replace(/-/g, '');
};

// create list of conferences
for (const conference of obj) {
// create content for readme
content += ( `
## [${conference.title}](${conference.url})
**Where:** ${conference.where}
**When:** ${conference.when}
`
);
}

// add contribute information after list of conferences
content += contribute;

// create README with the list of conferences
fs.writeFile('./README.md', content, function (err) {
if (err) throw err;
console.log('Updated conference list');
});
34 changes: 34 additions & 0 deletions list.json
@@ -0,0 +1,34 @@
[
{
"title": "AssertJS",
"url": "https://www.assertjs.com/",
"where": "San Antonio, TX",
"when": "February 22, 2018",
"month": "February",
"submissionDeadline": ""
},
{
"title": "RenderConf",
"url": "https://2018.render-conf.com/",
"where": "Oxford, UK",
"when": "March 23, 2018",
"month": "March",
"submissionDeadline": ""
},
{
"title": "ForwardJS Ottawa",
"url": "https://forwardjs.com/ottawa",
"where": "Ottawa, ON",
"when": "April 3-6, 2018",
"month": "April",
"submissionDeadline": ""
},
{
"title": "FullStack",
"url": "https://skillsmatter.com/conferences/9815-fullstack-2018-the-conference-on-javascript-node-and-internet-of-things",
"where": "London, UK",
"when": "July 11-13, 2018",
"month": "July",
"submissionDeadline": ""
}
]
39 changes: 39 additions & 0 deletions package.json
@@ -0,0 +1,39 @@
{
"name": "2018-conferences",
"version": "0.0.0",
"description": "A list of 2018 web development conferences",
"main": "index.js",
"scripts": {
},
"repository": {
"type": "git",
"url": "git+https://github.com/ryanburgess/2018-conferences.git"
},
"keywords": [
"javascript",
"node",
"react",
"ember",
"angular",
"html5",
"conferences",
"web",
"development",
"list"
],
"author": "Ryan Burgess",
"license": "MIT",
"bugs": {
"url": "https://github.com/ryanburgess/2018-conferences/issues"
},
"homepage": "https://github.com/ryanburgess/2018-conferences#readme",
"dependencies": {
},
"config": {
"ghooks": {
"pre-commit": "node index"
}
},
"devDependencies": {
}
}

0 comments on commit 9b4fb3a

Please sign in to comment.