Skip to content
This repository has been archived by the owner on Nov 21, 2018. It is now read-only.

WIP - Adds build process (Gulp.js-based) #119

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
3bf09f1
Added package.json, gulpfile and .gitignore
therebelrobot Jan 20, 2015
54cf295
Added gulp-markdown gulp-minify-css gulp-htmlmin gulp-less and browse…
therebelrobot Jan 20, 2015
95cf2a6
Added gulp tasks and config files for tasks, added content and source…
therebelrobot Jan 20, 2015
7ebfdad
Merge branch 'master' into build/gulpjs
snostorm Jan 20, 2015
9b489a2
use postcss for css autoprefixing and minification
Fishrock123 Jan 20, 2015
9dc2627
build: use gulp-stylus
Fishrock123 Jan 20, 2015
a2d311c
Clean task build out
therebelrobot Jan 21, 2015
f83a9c8
Merge branch 'master' into build/gulpjs
therebelrobot Jan 21, 2015
433bcd6
Stylus Compiling now working
therebelrobot Jan 22, 2015
e8112ee
Build/minifyCSS working now
therebelrobot Jan 22, 2015
0c6472c
translate styles.css to stylus
Fishrock123 Jan 22, 2015
595da4f
Templating / i18n working
therebelrobot Jan 22, 2015
2b2f414
Merge pull request #100 from iojs/build/stylus
therebelrobot Jan 22, 2015
cbe7ef0
[minor] removed unneeded object holders, added in noDuplicate param f…
therebelrobot Jan 25, 2015
6b649a5
Merge branch 'build/gulpjs' of github.com:iojs/website into build/gulpjs
therebelrobot Jan 25, 2015
42cdba5
Merge branch 'master' into build/gulpjs
therebelrobot Jan 29, 2015
4572dc3
Merge branch 'master' into build/gulpjs
snostorm Feb 5, 2015
8cdbf4c
Added some templates for current content
therebelrobot Feb 5, 2015
3465e89
Merge branch 'build/gulpjs' of github.com:iojs/website into build/gulpjs
therebelrobot Feb 8, 2015
1ab51a9
Merge branch 'master' into build/gulpjs
therebelrobot Feb 8, 2015
a06f800
Added template for main page, also added sample for spanish to test i18n
therebelrobot Feb 8, 2015
169204d
Removed interim gulp testing
therebelrobot Feb 8, 2015
16e2a7e
Added a page identifier to the main template for css triggering
therebelrobot Feb 8, 2015
7f373d5
split out individual page css to ensure no cross-page issues
therebelrobot Feb 8, 2015
455f26e
Added basic content for es6
therebelrobot Feb 8, 2015
6f906cd
Removed error in markdown translation of es6 page
therebelrobot Feb 8, 2015
8668268
Added mobile.styl for @media query styling
therebelrobot Feb 8, 2015
ab0abe2
Added english faq to spanish for translation
therebelrobot Feb 8, 2015
47cbc56
Added page title to template.json
therebelrobot Feb 8, 2015
9e1ff53
Updated styling for es6, added es6 placeholder in content/es
therebelrobot Feb 8, 2015
9b5009a
Readying for merge
therebelrobot Feb 8, 2015
aca6833
Updated build task to disable minifying for the time being
therebelrobot Feb 8, 2015
9a6559e
Added placeholder folders for new languages
therebelrobot Feb 8, 2015
e9bb60e
And the build files for the languages
therebelrobot Feb 8, 2015
838c68c
Updates README.md for new build process instructions
snostorm Feb 8, 2015
8f92c20
cleaning up
therebelrobot Feb 8, 2015
9b7d2ca
Merge branch 'build/gulpjs' of github.com:iojs/website into build/gulpjs
therebelrobot Feb 8, 2015
5823eb7
Fixed a stupid error
therebelrobot Feb 8, 2015
f5f4732
Adds local dev server (wip)
snostorm Feb 8, 2015
2cdc6c4
Added root redirect files to save compatibility for now
therebelrobot Feb 8, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
npm-debug.log
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,46 @@

##### [MIT Licensed](LICENSE)

## Project Structure

- [./content]() contains the source articles, organized by language-team groupings.
Articles are written in
[Github-flavoured Markdown](https://help.github.com/articles/github-flavored-markdown/).
- [./gulp]() organizes the [Gulp.js](http://gulpjs.com/)-driven build scripts used
by the project.
- [./public]() **currently** contains the full library of website content generated
by the build scripts. Changes should not be made directly here. Soon, we'll
be switching over to leveraging [iojs/build](https://github.com/iojs/build)
to help automate this.
- [./source] houses the reusable styling and structural elements used by the
project.
- [./wg-meetings] is an archive of the meeting minutes from this project's
Working Group (see [./GOVERNANCE.md]()).

## Running Locally

### Dependencies
```
git pull https://github.com/iojs/website.git
npm install -g gulp
npm install
```

### Local Development
```
gulp
```
Runs a local HTTP server on port 4657 with live-reload, which will update
your browser immediately with content or style changes. Generated assets
are provided to the [./public]() directory for publishing.

## Deployment

The website is currently hosted on a (sponsored) 3rd party provider with a deployment
process managed via the [io.js build team](https://github.com/iojs/build). As repo
changes are approved and merged to the master branch, changes are automatically
deployed within a few minutes.

## Current Project Team Members

* Trent Oswald (@therebelrobot) **Facilitator**
Expand Down
19 changes: 19 additions & 0 deletions TRANSLATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# io.js Website Translation Policy

io.js is a global platform and so this site has many translations. The translation of the site into
separate languages is handled by the localization working group of the language in question. If you
would like to contribute to the translation of iojs.org, please refer to the following process:

## For Individuals wanting to contribute
* Contact your appropriate localization group, and discuss with them the best possible way to contribute. A list of the localization groups can be found here: [TBD]

## For Localization Groups
* Ensure that any site translations are done as pull requests into this repo. This will ensure the build process, layout, and styling, remain consistent across the different translations of the site.
* You can find the appropriate language folder within `content/`
* There needs to be the following files in your language folder:
* `template.json` (this fills in the buttons and title bar with the appropriate translation)
* `index.md` (this contains the markdown translation for the home page. The paragraph order is important here, so please maintain it)
* `faq.md` (this contains markdown for the faq page)
* `es6.md` (this contains markdown for the ES6 explanation page)
* Any additional md files that are to be added can be done here, and will be dynamically generated into html using the template.
* Do not make language specific changes to layout or styling in a translation PR. If they are needed, make a separate styling/layout pr and chat with one of the website WG about the change. We want to make sure, for example, a Chinese layout change doesn't cascade failure to the German page.
69 changes: 69 additions & 0 deletions content/cn/es6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# ES6 on io.js

io.js is built against modern versions of [V8](https://code.google.com/p/v8/). By keeping up-to-date with the latest releases of this engine we ensure new features from the [JavaScript ECMA-262 specification](http://www.ecma-international.org/publications/standards/Ecma-262.htm) are brought to io.js developers in a timely manner, as well as continued performance and stability improvements.

Version 1.1.0 of io.js ships with V8 4.1.0.14, which includes ES6 features well beyond version 3.26.33 that will be shipped with joyent/node@0.12.x.

## No more --harmony flag

On joyent/node@0.12.x (V8 3.26), the `--harmony` runtime flag enabled all **completed**, **staged** and **in progress** ES6 features together, in bulk (with the exception of nonstandard/non-harmonious semantics for `typeof` which were hidden under `--harmony-typeof`). This meant that some really buggy or even broken features like [proxies](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) were just as readily available for developers as [generators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*), which had very little or even no known-issues. As such, it was best practice to either enable only certain features by using specific runtime harmony feature flags (e.g. `--harmony-generators`), or simply enable all of them and then use a restricted subset.

With io.js@1.x (V8 4.1+), all that complexity goes away. All harmony features are now logically split into three groups for **shipping**, **staged** and **in progress** features:

* All **shipping** features, the ones that V8 has considered stable, like [generators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*), [templates](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings), [new string methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla#Additions_to_the_String_object) and many others are turned **on by default on io.js** and do **NOT** require any kind of runtime flag.
* Then there are **staged** features which are almost-completed features that haven't been completely tested or updated to the latest spec yet and therefore are not considered stable by the V8 team (e.g. there might be some edge cases left to discover). This is probably the equivalent of the state of [generators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*) on 3.26. These are the "use at your own risk" type of features that now require a runtime flag: `--es_staging` (or its synonym, `--harmony`).
* Finally, all **in progress** features can be activated individually by their respective harmony flag (e.g. `--harmony_arrow_functions`), although this is highly discouraged unless for testing purposes.

## Which ES6 features ship with io.js by default (no runtime flag required)?


* Block scoping

* [let](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let)

* [const](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const)

* `function`-in-blocks

>As of v8 3.31.74.1, block-scoped declarations are [intentionally implemented with a non-compliant limitation to strict mode code](https://groups.google.com/forum/#!topic/v8-users/3UXNCkAU8Es). Developers should be aware that this will change as v8 continues towards ES6 specification compliance.

* Collections

* [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)

* [WeakMap](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap)

* [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set)

* [WeakSet](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet)* [Generators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*)

* [Binary and Octal literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Numeric_literals)

* [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)

* [New String methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla#Additions_to_the_String_object)

* [Symbols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol)

* [Template strings](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings)

You can view a more detailed list, including a comparison with other engines, on the [compat-table](https://kangax.github.io/compat-table/es6/) project page.

## Which ES6 features are behind the --es_staging flag?

* [Classes](https://github.com/lukehoban/es6features#classes) (strict mode only)
* [Object literal extensions](https://github.com/lukehoban/es6features#enhanced-object-literals)

* [`Symbol.toStringTag`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) (user-definable results for `Object.prototype.toString`)

## I have my infrastructure set up to leverage the --harmony flag. Should I remove it?

The current behaviour of the `--harmony` flag on io.js is to enable **staged** features only. After all, it is now a synonym of `--es_staging`. As mentioned above, these are completed features that have not been considered stable yet. If you want to play safe, especially on production environments, consider removing this runtime flag until it ships by default on V8 and, consequently, on io.js. If you keep this enabled, you should be prepared for further io.js upgrades to break your code if V8 changes their semantics to more closely follow the standard.

## How do I find which version of V8 ships with a particular version of io.js?

io.js provides a simple way to list all dependencies and respective versions that ship with a specific binary through the `process` global object. In case of the V8 engine, type the following in your terminal to retrieve its version:

```sh
iojs -p process.versions.v8
```
34 changes: 34 additions & 0 deletions content/cn/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# FAQ

## What is io.js?

[io.js](https://github.com/iojs/io.js) is a JavaScript platform built on [Chrome's V8 runtime](http://code.google.com/p/v8/). This project began as a fork of [Joyent's Node.js™](https://nodejs.org/) and is compatible with the [npm](https://www.npmjs.org/) ecosystem.

Why? io.js aims to provide faster and predictable release cycles. It currently merges in the latest language, API and performance improvements to V8 while also updating libuv and other base libraries.

This project aims to continue development of io.js under an "[open governance model](https://github.com/iojs/io.js/blob/v1.x/GOVERNANCE.md#readme)" as opposed to corporate stewardship.

## Version 1.0.x?

io.js has moved to [Semver](http://semver.org/) and the changes between Node.js™ 0.10 and io.js 1.0.0 were significant enough
to warrant a major version increment.

Our [CHANGELOG](https://github.com/iojs/io.js/blob/v1.x/CHANGELOG.md) for v1.x provides a [summary of changes from Node.js v0.10.35 to io.js v1.0.x](https://github.com/iojs/io.js/blob/v1.x/CHANGELOG.md#summary-of-changes-from-nodejs-v01035-to-iojs-v100).

## How can I contribute?

Everyone can help. io.js adheres to a [code of conduct](https://github.com/iojs/io.js/blob/v1.x/CONTRIBUTING.md#code-of-conduct), and contributions, releases, and contributorship are under an [open governance](https://github.com/iojs/io.js/blob/v1.x/GOVERNANCE.md#readme) model.

To get started, there are open [ discussions on GitHub](https://github.com/iojs/io.js/issues), and we'd love to hear your feedback.
Becoming involved in discussions is a good way to get a feel of where you can help out further. If there is
something there you feel you can tackle, please [make a pull request](https://github.com/iojs/io.js/blob/v1.x/CONTRIBUTING.md#code-contributions).

In addition, using [Nodebug.me](http://nodebug.me/) is a good way to help Triage the issues in the backlog.

## Where do discussions take place?

There is an #io.js channel on Freenode IRC. We keep logs of the channel [here](http://logs.libuv.org/io.js/latest).

## What is open source governance?

Open source governance advocates the application of the philosophies of the open source and open content movements in order to enable any interested party to add to the creation of the end product, as with a wiki document. Legislation is democratically opened to the general citizenry, employing their collective wisdom to benefit the decision-making process and improve democracy. [[source]](https://en.wikipedia.org/wiki/Open-source_governance)
22 changes: 22 additions & 0 deletions content/cn/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# JavaScript I/O

Bringing [ES6](es6.html) to the Node Community!

[io.js](https://github.com/iojs/io.js) is an [npm](https://www.npmjs.org/) compatible platform originally based on [node.js](https://nodejs.org/)™.

[![io.js](../images/1.0.0.png)](https://iojs.org/dist/v1.1.0/)

[Version 1.1.0](https://iojs.org/dist/v1.1.0/)

Download for
[Linux](https://iojs.org/dist/v1.1.0/iojs-v1.1.0-linux-x64.tar.xz),
[Win32](https://iojs.org/dist/v1.1.0/iojs-v1.1.0-x86.msi), [Win64](https://iojs.org/dist/v1.1.0/iojs-v1.1.0-x64.msi),
or
[Mac](https://iojs.org/dist/v1.1.0/iojs-v1.1.0.pkg).


[Changelog](https://github.com/iojs/io.js/blob/v1.x/CHANGELOG.md)

[Nightly releases](https://iojs.org/download/nightly/) are available for testing.

[Frequently Asked Questions](/faq.html)
12 changes: 12 additions & 0 deletions content/cn/template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"browser-title":"io.js - JavaScript I/O",
"logo-text":"io.js",
"faq-link":"FAQ",
"es6-link":"ES6",
"api-link":"API Docs",
"issues-link":"GitHub Issues",
"org-link":"GitHub Org",
"irc-link":"IRC Chat",
"irc-logs-link":"Logs",
"gov-link":"Governance"
}
69 changes: 69 additions & 0 deletions content/cs/es6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# ES6 on io.js

io.js is built against modern versions of [V8](https://code.google.com/p/v8/). By keeping up-to-date with the latest releases of this engine we ensure new features from the [JavaScript ECMA-262 specification](http://www.ecma-international.org/publications/standards/Ecma-262.htm) are brought to io.js developers in a timely manner, as well as continued performance and stability improvements.

Version 1.1.0 of io.js ships with V8 4.1.0.14, which includes ES6 features well beyond version 3.26.33 that will be shipped with joyent/node@0.12.x.

## No more --harmony flag

On joyent/node@0.12.x (V8 3.26), the `--harmony` runtime flag enabled all **completed**, **staged** and **in progress** ES6 features together, in bulk (with the exception of nonstandard/non-harmonious semantics for `typeof` which were hidden under `--harmony-typeof`). This meant that some really buggy or even broken features like [proxies](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) were just as readily available for developers as [generators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*), which had very little or even no known-issues. As such, it was best practice to either enable only certain features by using specific runtime harmony feature flags (e.g. `--harmony-generators`), or simply enable all of them and then use a restricted subset.

With io.js@1.x (V8 4.1+), all that complexity goes away. All harmony features are now logically split into three groups for **shipping**, **staged** and **in progress** features:

* All **shipping** features, the ones that V8 has considered stable, like [generators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*), [templates](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings), [new string methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla#Additions_to_the_String_object) and many others are turned **on by default on io.js** and do **NOT** require any kind of runtime flag.
* Then there are **staged** features which are almost-completed features that haven't been completely tested or updated to the latest spec yet and therefore are not considered stable by the V8 team (e.g. there might be some edge cases left to discover). This is probably the equivalent of the state of [generators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*) on 3.26. These are the "use at your own risk" type of features that now require a runtime flag: `--es_staging` (or its synonym, `--harmony`).
* Finally, all **in progress** features can be activated individually by their respective harmony flag (e.g. `--harmony_arrow_functions`), although this is highly discouraged unless for testing purposes.

## Which ES6 features ship with io.js by default (no runtime flag required)?


* Block scoping

* [let](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let)

* [const](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const)

* `function`-in-blocks

>As of v8 3.31.74.1, block-scoped declarations are [intentionally implemented with a non-compliant limitation to strict mode code](https://groups.google.com/forum/#!topic/v8-users/3UXNCkAU8Es). Developers should be aware that this will change as v8 continues towards ES6 specification compliance.

* Collections

* [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)

* [WeakMap](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap)

* [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set)

* [WeakSet](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet)* [Generators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*)

* [Binary and Octal literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Numeric_literals)

* [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)

* [New String methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla#Additions_to_the_String_object)

* [Symbols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol)

* [Template strings](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings)

You can view a more detailed list, including a comparison with other engines, on the [compat-table](https://kangax.github.io/compat-table/es6/) project page.

## Which ES6 features are behind the --es_staging flag?

* [Classes](https://github.com/lukehoban/es6features#classes) (strict mode only)
* [Object literal extensions](https://github.com/lukehoban/es6features#enhanced-object-literals)

* [`Symbol.toStringTag`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) (user-definable results for `Object.prototype.toString`)

## I have my infrastructure set up to leverage the --harmony flag. Should I remove it?

The current behaviour of the `--harmony` flag on io.js is to enable **staged** features only. After all, it is now a synonym of `--es_staging`. As mentioned above, these are completed features that have not been considered stable yet. If you want to play safe, especially on production environments, consider removing this runtime flag until it ships by default on V8 and, consequently, on io.js. If you keep this enabled, you should be prepared for further io.js upgrades to break your code if V8 changes their semantics to more closely follow the standard.

## How do I find which version of V8 ships with a particular version of io.js?

io.js provides a simple way to list all dependencies and respective versions that ship with a specific binary through the `process` global object. In case of the V8 engine, type the following in your terminal to retrieve its version:

```sh
iojs -p process.versions.v8
```
Loading