Repository: FreeCodeCampChina/freecodecamp.cn
Branch: dev
Commit: b09a3a0dec1f
Files: 501
Total size: 7.3 MB
Directory structure:
gitextract_acp9dswb/
├── .babelrc
├── .bowerrc
├── .editorconfig
├── .eslintignore
├── .eslintrc
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE.md
│ └── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── .jshintrc
├── .node-inspectorrc
├── .travis.yml
├── CONTRIBUTING.md
├── LICENSE
├── LICENSE-freeCodeCamp-Curriculum.md
├── LICENSE-freeCodeCamp-Translation.md
├── README.md
├── bower.json
├── client/
│ ├── README.md
│ ├── commonFramework/
│ │ ├── add-loop-protect.js
│ │ ├── bindings.js
│ │ ├── code-storage.js
│ │ ├── code-uri.js
│ │ ├── create-editor.js
│ │ ├── detect-unsafe-code-stream.js
│ │ ├── display-test-results.js
│ │ ├── end.js
│ │ ├── execute-challenge-stream.js
│ │ ├── get-iframe.js
│ │ ├── init.js
│ │ ├── output-display.js
│ │ ├── phone-scroll-lock.js
│ │ ├── report-issue.js
│ │ ├── run-tests-stream.js
│ │ ├── show-completion.js
│ │ ├── step-challenge.js
│ │ └── update-preview.js
│ ├── es6-shims.js
│ ├── iFrameScripts.js
│ ├── index.js
│ ├── less/
│ │ ├── challenge.less
│ │ ├── chat.less
│ │ ├── jobs.less
│ │ ├── lib/
│ │ │ ├── animate.min.less
│ │ │ ├── bootstrap/
│ │ │ │ ├── alerts.less
│ │ │ │ ├── badges.less
│ │ │ │ ├── bootstrap.less
│ │ │ │ ├── breadcrumbs.less
│ │ │ │ ├── button-groups.less
│ │ │ │ ├── buttons.less
│ │ │ │ ├── carousel.less
│ │ │ │ ├── close.less
│ │ │ │ ├── code.less
│ │ │ │ ├── component-animations.less
│ │ │ │ ├── dropdowns.less
│ │ │ │ ├── forms.less
│ │ │ │ ├── glyphicons.less
│ │ │ │ ├── grid.less
│ │ │ │ ├── input-groups.less
│ │ │ │ ├── jumbotron.less
│ │ │ │ ├── labels.less
│ │ │ │ ├── list-group.less
│ │ │ │ ├── media.less
│ │ │ │ ├── mixins/
│ │ │ │ │ ├── alerts.less
│ │ │ │ │ ├── background-variant.less
│ │ │ │ │ ├── border-radius.less
│ │ │ │ │ ├── buttons.less
│ │ │ │ │ ├── center-block.less
│ │ │ │ │ ├── clearfix.less
│ │ │ │ │ ├── forms.less
│ │ │ │ │ ├── gradients.less
│ │ │ │ │ ├── grid-framework.less
│ │ │ │ │ ├── grid.less
│ │ │ │ │ ├── hide-text.less
│ │ │ │ │ ├── image.less
│ │ │ │ │ ├── labels.less
│ │ │ │ │ ├── list-group.less
│ │ │ │ │ ├── nav-divider.less
│ │ │ │ │ ├── nav-vertical-align.less
│ │ │ │ │ ├── opacity.less
│ │ │ │ │ ├── pagination.less
│ │ │ │ │ ├── panels.less
│ │ │ │ │ ├── progress-bar.less
│ │ │ │ │ ├── reset-filter.less
│ │ │ │ │ ├── resize.less
│ │ │ │ │ ├── responsive-visibility.less
│ │ │ │ │ ├── size.less
│ │ │ │ │ ├── tab-focus.less
│ │ │ │ │ ├── table-row.less
│ │ │ │ │ ├── text-emphasis.less
│ │ │ │ │ ├── text-overflow.less
│ │ │ │ │ └── vendor-prefixes.less
│ │ │ │ ├── mixins.less
│ │ │ │ ├── modals.less
│ │ │ │ ├── navbar.less
│ │ │ │ ├── navs.less
│ │ │ │ ├── normalize.less
│ │ │ │ ├── pager.less
│ │ │ │ ├── pagination.less
│ │ │ │ ├── panels.less
│ │ │ │ ├── popovers.less
│ │ │ │ ├── print.less
│ │ │ │ ├── progress-bars.less
│ │ │ │ ├── responsive-embed.less
│ │ │ │ ├── responsive-utilities.less
│ │ │ │ ├── scaffolding.less
│ │ │ │ ├── tables.less
│ │ │ │ ├── theme.less
│ │ │ │ ├── thumbnails.less
│ │ │ │ ├── tooltip.less
│ │ │ │ ├── type.less
│ │ │ │ ├── utilities.less
│ │ │ │ ├── variables.less
│ │ │ │ └── wells.less
│ │ │ ├── bootstrap-social/
│ │ │ │ └── bootstrap-social.less
│ │ │ ├── font-awesome-4.3.0/
│ │ │ │ ├── css/
│ │ │ │ │ └── font-awesome.css
│ │ │ │ ├── fonts/
│ │ │ │ │ └── FontAwesome.otf
│ │ │ │ ├── less/
│ │ │ │ │ ├── animated.less
│ │ │ │ │ ├── bordered-pulled.less
│ │ │ │ │ ├── core.less
│ │ │ │ │ ├── fixed-width.less
│ │ │ │ │ ├── font-awesome.less
│ │ │ │ │ ├── icons.less
│ │ │ │ │ ├── larger.less
│ │ │ │ │ ├── list.less
│ │ │ │ │ ├── mixins.less
│ │ │ │ │ ├── path.less
│ │ │ │ │ ├── rotated-flipped.less
│ │ │ │ │ ├── stacked.less
│ │ │ │ │ └── variables.less
│ │ │ │ └── scss/
│ │ │ │ ├── _animated.scss
│ │ │ │ ├── _bordered-pulled.scss
│ │ │ │ ├── _core.scss
│ │ │ │ ├── _fixed-width.scss
│ │ │ │ ├── _icons.scss
│ │ │ │ ├── _larger.scss
│ │ │ │ ├── _list.scss
│ │ │ │ ├── _mixins.scss
│ │ │ │ ├── _path.scss
│ │ │ │ ├── _rotated-flipped.scss
│ │ │ │ ├── _stacked.scss
│ │ │ │ ├── _variables.scss
│ │ │ │ └── font-awesome.scss
│ │ │ └── ionicons/
│ │ │ ├── _ionicons-animation.less
│ │ │ ├── _ionicons-font.less
│ │ │ ├── _ionicons-icons.less
│ │ │ ├── _ionicons-variables.less
│ │ │ └── ionicons.less
│ │ ├── main.less
│ │ ├── map.less
│ │ ├── signin.less
│ │ ├── toastr.less
│ │ └── wiki.less
│ ├── main.js
│ ├── plugin.js
│ └── sagas/
│ ├── README.md
│ ├── err-saga.js
│ ├── hard-go-to-saga.js
│ ├── index.js
│ ├── local-storage-saga.js
│ └── title-saga.js
├── common/
│ ├── app/
│ │ ├── App.jsx
│ │ ├── components/
│ │ │ ├── Flash/
│ │ │ │ ├── Queue.jsx
│ │ │ │ └── index.jsx
│ │ │ ├── Footer/
│ │ │ │ ├── Footer.jsx
│ │ │ │ ├── README.md
│ │ │ │ ├── index.js
│ │ │ │ └── links.json
│ │ │ ├── Nav/
│ │ │ │ ├── Nav.jsx
│ │ │ │ ├── NavItem.jsx
│ │ │ │ ├── index.js
│ │ │ │ └── links.json
│ │ │ ├── NotFound/
│ │ │ │ └── index.jsx
│ │ │ └── README.md
│ │ ├── create-app.jsx
│ │ ├── create-reducer.js
│ │ ├── index.js
│ │ ├── middlewares.js
│ │ ├── provide-store.js
│ │ ├── redux/
│ │ │ ├── actions.js
│ │ │ ├── fetch-user-saga.js
│ │ │ ├── index.js
│ │ │ ├── oldActions.js
│ │ │ ├── reducer.js
│ │ │ └── types.js
│ │ ├── routes/
│ │ │ ├── Admin/
│ │ │ │ └── README.md
│ │ │ ├── Bonfires/
│ │ │ │ └── README.md
│ │ │ ├── Hikes/
│ │ │ │ ├── components/
│ │ │ │ │ ├── Hike.jsx
│ │ │ │ │ ├── Hikes.jsx
│ │ │ │ │ ├── Lecture.jsx
│ │ │ │ │ ├── Map.jsx
│ │ │ │ │ └── Questions.jsx
│ │ │ │ ├── index.js
│ │ │ │ └── redux/
│ │ │ │ ├── actions.js
│ │ │ │ ├── answer-saga.js
│ │ │ │ ├── fetch-hikes-saga.js
│ │ │ │ ├── index.js
│ │ │ │ ├── oldActions.js
│ │ │ │ ├── reducer.js
│ │ │ │ ├── selectors.js
│ │ │ │ ├── types.js
│ │ │ │ └── utils.js
│ │ │ ├── Jobs/
│ │ │ │ ├── README.md
│ │ │ │ ├── components/
│ │ │ │ │ ├── JobNotFound.jsx
│ │ │ │ │ ├── JobTotal.jsx
│ │ │ │ │ ├── Jobs.jsx
│ │ │ │ │ ├── List.jsx
│ │ │ │ │ ├── NewJob.jsx
│ │ │ │ │ ├── NewJobCompleted.jsx
│ │ │ │ │ ├── Preview.jsx
│ │ │ │ │ ├── Show.jsx
│ │ │ │ │ └── ShowJob.jsx
│ │ │ │ ├── index.js
│ │ │ │ ├── redux/
│ │ │ │ │ ├── actions.js
│ │ │ │ │ ├── apply-promo-saga.js
│ │ │ │ │ ├── fetch-jobs-saga.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── jobs-form-normalizer.js
│ │ │ │ │ ├── oldActions.js
│ │ │ │ │ ├── reducer.js
│ │ │ │ │ ├── save-job-saga.js
│ │ │ │ │ └── types.js
│ │ │ │ └── utils.js
│ │ │ └── index.js
│ │ ├── sagas.js
│ │ ├── shared/
│ │ │ └── README.md
│ │ └── utils/
│ │ ├── Professor-Context.js
│ │ ├── create-types.js
│ │ ├── professor-x.js
│ │ ├── render-to-string.js
│ │ ├── render.js
│ │ └── shallow-equals.js
│ ├── config.global.js
│ ├── models/
│ │ ├── User-Credential.json
│ │ ├── User-Identity.js
│ │ ├── User-Identity.json
│ │ ├── challenge.json
│ │ ├── job.json
│ │ ├── nonprofit.json
│ │ ├── pledge.json
│ │ ├── promo.js
│ │ ├── promo.json
│ │ ├── story.json
│ │ ├── user.js
│ │ └── user.json
│ └── utils/
│ ├── ajax-stream.js
│ ├── constantStrings.json
│ ├── index.js
│ ├── jsonp$.js
│ └── services-creator.js
├── config/
│ └── secrets.js
├── dataAsync.js
├── full-test-data.js
├── gulpfile.js
├── leanTest.js
├── package.json
├── pm2Start.js
├── public/
│ ├── browserconfig.xml
│ ├── code.html
│ ├── css/
│ │ ├── Vimeo.css
│ │ ├── lato.css
│ │ ├── main-69858c7174.css
│ │ ├── main-ec0d2f5228.css
│ │ ├── main-f928abf444.css
│ │ ├── main.css
│ │ ├── themes/
│ │ │ ├── flatly.less
│ │ │ └── modern.less
│ │ └── ubuntu.css
│ ├── favicons/
│ │ ├── android-chrome-manifest.json
│ │ └── browserconfig.xml
│ ├── favicons.html
│ ├── fonts/
│ │ └── FontAwesome.otf
│ ├── grouth-hacker.html
│ ├── js/
│ │ ├── .jshintrc
│ │ ├── angular.js
│ │ ├── calculator.js
│ │ ├── commonFramework-2c9795240d.js
│ │ ├── commonFramework-2f0be7f94b.js
│ │ ├── commonFramework-64e637bbe5.js
│ │ ├── commonFramework-e9a2482e6b.js
│ │ ├── commonFramework.js
│ │ ├── dashboard.js
│ │ ├── echarts-all-3.js
│ │ ├── greensock.js
│ │ ├── join-group.js
│ │ ├── join-race.js
│ │ ├── lib/
│ │ │ ├── jailed/
│ │ │ │ ├── _JailedSite.js
│ │ │ │ ├── _frame.html
│ │ │ │ ├── _frame.js
│ │ │ │ ├── _pluginCore.js
│ │ │ │ ├── _pluginNode.js
│ │ │ │ ├── _pluginWeb.js
│ │ │ │ └── jailed.js
│ │ │ └── loop-protect/
│ │ │ ├── LICENSE.md
│ │ │ └── loop-protect.js
│ │ └── sidecar.v1.js
│ ├── json/
│ │ ├── bootcamps.json
│ │ └── cats.json
│ ├── leader-board.html
│ ├── progress.html
│ └── robots.txt
├── seed/
│ ├── bonfireMDNlinks.js
│ ├── challenges/
│ │ ├── 00-getting-started/
│ │ │ └── getting-started.json
│ │ ├── 01-front-end-development-certification/
│ │ │ ├── advanced-bonfires.json
│ │ │ ├── advanced-ziplines.json
│ │ │ ├── basic-bonfires.json
│ │ │ ├── basic-javascript.json
│ │ │ ├── basic-ziplines.json
│ │ │ ├── bootstrap.json
│ │ │ ├── front-end-development-certificate.json
│ │ │ ├── gear-up-for-success.json
│ │ │ ├── html5-and-css.json
│ │ │ ├── intermediate-bonfires.json
│ │ │ ├── intermediate-ziplines.json
│ │ │ ├── jquery.json
│ │ │ ├── json-apis-and-ajax.json
│ │ │ └── object-oriented-and-functional-programming.json
│ │ ├── 02-data-visualization-certification/
│ │ │ ├── d3.json
│ │ │ ├── data-visualization-certificate.json
│ │ │ ├── data-visualization-projects.json
│ │ │ ├── react-projects.json
│ │ │ ├── react.json
│ │ │ └── sass.json
│ │ ├── 03-back-end-development-certification/
│ │ │ ├── api-projects.json
│ │ │ ├── automated-testing-and-debugging.json
│ │ │ ├── back-end-development-certificate.json
│ │ │ ├── dynamic-web-applications.json
│ │ │ ├── git.json
│ │ │ ├── mongodb.json
│ │ │ └── nodejs-and-expressjs.json
│ │ └── 04-video-challenges/
│ │ ├── accessibility.json
│ │ ├── agile.json
│ │ ├── bigonotation.json
│ │ ├── chromedevtools.json
│ │ ├── computer-basics.json
│ │ ├── computer-science.json
│ │ ├── data-visualization.json
│ │ ├── devops.json
│ │ ├── dom.json
│ │ ├── embedded-and-internet-of-things.json
│ │ ├── game-development.json
│ │ ├── gamification.json
│ │ ├── jslingo.json
│ │ ├── machine-learning.json
│ │ ├── math-for-programmers.json
│ │ ├── mobile-javascript-development.json
│ │ ├── software-engineering-principles.json
│ │ ├── statistics.json
│ │ ├── tools.json
│ │ ├── user-experience-design.json
│ │ └── visual-design.json
│ ├── create-challenge-bundle.js
│ ├── get-challenge-completion.js
│ ├── get-emails.js
│ ├── getChallenges.js
│ ├── index.js
│ ├── loopbackMigration.js
│ └── test-challenges.js
├── server/
│ ├── README.md
│ ├── boot/
│ │ ├── a-extendUser.js
│ │ ├── a-extendUserIdent.js
│ │ ├── a-react.js
│ │ ├── a-services.js
│ │ ├── about.js
│ │ ├── authentication.js
│ │ ├── certificate.js
│ │ ├── challenge.js
│ │ ├── commit.js
│ │ ├── explorer.js
│ │ ├── home.js
│ │ ├── randomAPIs.js
│ │ ├── redirectHttps.js
│ │ ├── redirects.js
│ │ ├── restApi.js
│ │ ├── story.js
│ │ ├── t-wiki.js
│ │ └── user.js
│ ├── config.development.js
│ ├── config.json
│ ├── config.local.js
│ ├── config.production.js
│ ├── datasources.json
│ ├── datasources.local.js
│ ├── debug-entry.js
│ ├── manifests/
│ │ └── README.md
│ ├── middleware.json
│ ├── middlewares/
│ │ ├── add-return-to.js
│ │ ├── constant-headers.js
│ │ ├── cookie-parser.js
│ │ ├── csp.js
│ │ ├── error-handlers.js
│ │ ├── express-rx.js
│ │ ├── global-locals.js
│ │ ├── jade-helpers.js
│ │ ├── keymetrics.js
│ │ ├── migrate-completed-challenges.js
│ │ ├── revision-helpers.js
│ │ ├── sessions.js
│ │ └── validator.js
│ ├── model-config.json
│ ├── passport-providers.js
│ ├── production-start.js
│ ├── resources/
│ │ ├── labs.json
│ │ └── testimonials.json
│ ├── server.js
│ ├── services/
│ │ ├── hikes.js
│ │ ├── job.js
│ │ └── user.js
│ ├── ssl-config.js
│ ├── utils/
│ │ ├── auth.js
│ │ ├── bad-id-map.js
│ │ ├── certTypes.json
│ │ ├── commit-goals.json
│ │ ├── commit.js
│ │ ├── commit.json
│ │ ├── constantStrings.json
│ │ ├── constants.js
│ │ ├── date-utils.js
│ │ ├── getFromDisk$.js
│ │ ├── index.js
│ │ ├── middleware.js
│ │ ├── resources.json
│ │ ├── rx.js
│ │ └── user-stats.js
│ └── views/
│ ├── account/
│ │ ├── email-signin.jade
│ │ ├── email-signup.jade
│ │ ├── forgot.jade
│ │ ├── reset.jade
│ │ ├── settings.jade
│ │ ├── show.jade
│ │ └── signin.jade
│ ├── certificate/
│ │ ├── back-end.jade
│ │ ├── data-vis.jade
│ │ ├── font.jade
│ │ ├── front-end.jade
│ │ ├── full-stack.jade
│ │ ├── index.jade
│ │ └── script.jade
│ ├── challenges/
│ │ ├── showBonfire.jade
│ │ ├── showHTML.jade
│ │ ├── showJS.jade
│ │ ├── showStep.jade
│ │ ├── showVideo.jade
│ │ └── showZiplineOrBasejump.jade
│ ├── commit/
│ │ ├── directory.jade
│ │ ├── index.jade
│ │ └── pledge.jade
│ ├── feed.jade
│ ├── home.jade
│ ├── layout-react.jade
│ ├── layout-wide.jade
│ ├── layout.jade
│ ├── map/
│ │ └── show.jade
│ ├── partials/
│ │ ├── challenge-footer.jade
│ │ ├── challenge-modals.jade
│ │ ├── flash.jade
│ │ ├── footer.jade
│ │ ├── meta.jade
│ │ ├── navbar.jade
│ │ ├── react-stylesheets.jade
│ │ ├── scripts.jade
│ │ └── stylesheets.jade
│ ├── redirect-https.html
│ ├── redirect-https.jade
│ ├── resources/
│ │ ├── about.jade
│ │ ├── academic-honesty.jade
│ │ ├── calculator.jade
│ │ ├── code-of-conduct.jade
│ │ ├── code.jade
│ │ ├── dashboard.jade
│ │ ├── group.jade
│ │ ├── how-nonprofit-projects-work.jade
│ │ ├── labs.jade
│ │ ├── links.jade
│ │ ├── nonprofits-form.jade
│ │ ├── nonprofits.jade
│ │ ├── pmi-acp-agile-project-managers-form.jade
│ │ ├── pmi-acp-agile-project-managers.jade
│ │ ├── privacy.jade
│ │ ├── progress.jade
│ │ ├── shop.jade
│ │ ├── sitemap.jade
│ │ ├── stories.jade
│ │ ├── terms-of-service.jade
│ │ ├── test.css
│ │ ├── the-fastest-web-page-on-the-internet.jade
│ │ └── unsubscribed.jade
│ ├── sponsors/
│ │ ├── sponsors.html
│ │ └── sponsors.jade
│ ├── stories/
│ │ ├── hot-stories.jade
│ │ ├── index.jade
│ │ ├── news-nav.jade
│ │ ├── preliminary-submit.jade
│ │ ├── show.jade
│ │ └── submit-story.jade
│ └── wiki/
│ └── show.jade
├── simple-json.js
├── test/
│ └── server/
│ └── utils/
│ ├── date-utils-test.js
│ └── user-stats-test.js
├── webpack.config.js
└── webpack.config.node.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .babelrc
================================================
{
"presets": ["es2015", "react", "stage-0"],
"plugins": ["babel-plugin-add-module-exports"]
}
================================================
FILE: .bowerrc
================================================
{
"directory" : "public/bower_components"
}
================================================
FILE: .editorconfig
================================================
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
================================================
FILE: .eslintignore
================================================
public/**/*.js
================================================
FILE: .eslintrc
================================================
{
"parserOption": {
"ecmaVersion": 6,
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"mocha": true,
"node": true
},
"parser": "babel-eslint",
"plugins": [
"react"
],
"globals": {
"Promise": true,
"window": true,
"$": true,
"ga": true,
"jQuery": true,
"router": true
},
"rules": {
"comma-dangle": 2,
"no-cond-assign": 2,
"no-console": 0,
"no-constant-condition": 2,
"no-control-regex": 2,
"no-debugger": 2,
"no-dupe-keys": 2,
"no-empty": 2,
"no-empty-character-class": 2,
"no-ex-assign": 2,
"no-extra-boolean-cast": 2,
"no-extra-parens": 0,
"no-extra-semi": 2,
"no-func-assign": 2,
"no-inner-declarations": 2,
"no-invalid-regexp": 2,
"no-irregular-whitespace": 2,
"no-negated-in-lhs": 2,
"no-obj-calls": 2,
"no-regex-spaces": 2,
"no-reserved-keys": 0,
"no-sparse-arrays": 2,
"no-unreachable": 2,
"use-isnan": 2,
"valid-jsdoc": 2,
"valid-typeof": 2,
"block-scoped-var": 0,
"complexity": 0,
"curly": 2,
"default-case": 1,
"dot-notation": 0,
"eqeqeq": 1,
"guard-for-in": 1,
"no-alert": 1,
"no-caller": 2,
"no-div-regex": 2,
"no-else-return": 0,
"no-eq-null": 1,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-fallthrough": 2,
"no-floating-decimal": 2,
"no-implied-eval": 2,
"no-iterator": 2,
"no-labels": 2,
"no-lone-blocks": 2,
"no-loop-func": 1,
"no-multi-spaces": 1,
"no-multi-str": 2,
"no-native-reassign": 2,
"no-new": 2,
"no-new-func": 2,
"no-new-wrappers": 2,
"no-octal": 2,
"no-octal-escape": 2,
"no-process-env": 0,
"no-proto": 2,
"no-redeclare": 1,
"no-return-assign": 2,
"no-script-url": 2,
"no-self-compare": 2,
"no-sequences": 2,
"no-unused-expressions": 2,
"no-void": 1,
"no-warning-comments": [
1,
{
"terms": [
"fixme"
],
"location": "start"
}
],
"no-with": 2,
"radix": 2,
"vars-on-top": 0,
"wrap-iife": [2, "any"],
"yoda": 0,
"strict": 0,
"no-catch-shadow": 2,
"no-delete-var": 2,
"no-label-var": 2,
"no-shadow": 0,
"no-shadow-restricted-names": 2,
"no-undef": 2,
"no-undef-init": 2,
"no-undefined": 1,
"no-unused-vars": [2, { "argsIgnorePattern": "^_" }],
"no-use-before-define": 0,
"handle-callback-err": 2,
"no-mixed-requires": 0,
"no-new-require": 2,
"no-path-concat": 2,
"no-process-exit": 2,
"no-restricted-modules": 0,
"no-sync": 0,
"brace-style": [
2,
"1tbs",
{ "allowSingleLine": true }
],
"camelcase": 1,
"comma-spacing": [
2,
{
"before": false,
"after": true
}
],
"comma-style": [
2, "last"
],
"consistent-this": 0,
"eol-last": 2,
"func-names": 0,
"func-style": 0,
"key-spacing": [
2,
{
"beforeColon": false,
"afterColon": true
}
],
"max-nested-callbacks": 0,
"new-cap": 0,
"new-parens": 2,
"no-array-constructor": 2,
"no-inline-comments": 1,
"no-mixed-spaces-and-tabs": 2,
"no-multiple-empty-lines": [
1,
{ "max": 2 }
],
"no-nested-ternary": 2,
"no-new-object": 2,
"semi-spacing": [2, { "before": false, "after": true }],
"no-spaced-func": 2,
"no-ternary": 0,
"no-trailing-spaces": 1,
"no-underscore-dangle": 0,
"one-var": 0,
"operator-assignment": 0,
"padded-blocks": 0,
"quote-props": 0,
"quotes": [
2,
"single",
"avoid-escape"
],
"semi": [
2,
"always"
],
"sort-vars": 0,
"keyword-spacing": [ 2 ],
"space-before-function-paren": [
2,
"never"
],
"space-before-blocks": [
2,
"always"
],
"space-in-brackets": 0,
"space-in-parens": 0,
"space-infix-ops": 2,
"space-unary-ops": [
1,
{
"words": true,
"nonwords": false
}
],
"spaced-comment": [
2,
"always",
{ "exceptions": ["-"] }
],
"wrap-regex": 1,
"max-depth": 0,
"max-len": [
2,
120,
2
],
"max-params": 0,
"max-statements": 0,
"no-bitwise": 1,
"no-plusplus": 0,
"react/display-name": 1,
"react/jsx-boolean-value": [1, "always"],
"jsx-quotes": [1, "prefer-single"],
"react/jsx-no-undef": 1,
"react/jsx-sort-props": [1, { "ignoreCase": true }],
"react/jsx-uses-react": 1,
"react/jsx-uses-vars": 1,
"react/no-did-mount-set-state": 2,
"react/no-did-update-set-state": 2,
"react/no-multi-comp": [2, { "ignoreStateless": true } ],
"react/prop-types": 2,
"react/react-in-jsx-scope": 1,
"react/self-closing-comp": 1,
"react/wrap-multilines": 1
}
}
================================================
FILE: .gitattributes
================================================
public/js/lib/codemirror/* linguist-vendored
*.jsx linguist-language=JavaScript
================================================
FILE: .github/ISSUE_TEMPLATE.md
================================================
## 注意:这里只处理 FreeCodeCamp.cn 的相关问题,不处理 w3cschool 的任何问题
## 注意:请不要乱开无意义的 Issue,违者直接加黑名单
## 注意:Issue 是用来处理代码库中的 bug,不是用来提问题的。完成挑战过程中遇到的代码问题请在[gitter 讨论组](https://gitter.im/FreeCodeCamp/chinese) 或者 QQ 群 526289580 中讨论 (QQ 群验证答案: ___**freeCodeCamp**___ 注意大小写)
#### FreeCodeCamp.cn Issue 模板
如何使用本模板:
* 尽可能多填些相关信息,方便管理员参考
* 对于无法给出的内容,请删除掉那一行
# 以上内容请在提交 Issue 之前删除
#### 浏览器信息
* 浏览器名称,版本号
* 操作系统
#### 问题描述
* 问题是在什么时候,什么情况下遇到的
* 简要说明如何重现
#### 你的代码
```
如果和代码相关,请在这里粘贴你的全部代码
```
#### 截图(如果有)
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
## FreeCodeCamp Pull Request template
Please, go through these steps before you submit a PR.
1. Make sure that your PR is not a duplicate.
2. If not, then make sure that:
2.1. You have done your changes in a separate branch. Branches MUST have descriptive names that start with either the `fix/` or `feature/` prefixes. Good examples are: `fix/signin-issue` or `feature/issue-templates`.
2.2. You have a descriptive commit message with a short title (first line).
2.3. You have only one commit (if not, [squash](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/git-rebase#squashing-multiple-commits-into-one) them into one commit).
2.4. `npm test` doesn't throw any error. If it does, fix them first and amend your commit (`git commit --amend`).
3. **After** these steps, you're ready to open a pull request.
3.1. Your pull request MUST NOT target the `master` branch on FreeCodeCamp's repository. You probably want to target `staging` instead.
3.2. Give a descriptive title to your PR.
3.3. Provide a description of your changes.
3.4. Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if such).
IMPORTANT: Please review the [CONTRIBUTING.md](../CONTRIBUTING.md) file for detailed contributing guidelines.
**PLEASE REMOVE THIS TEMPLATE BEFORE SUBMITTING**
================================================
FILE: .gitignore
================================================
lib-cov
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz
*.swp
.floo
.flooignore
builtAssets/
pm2.js
*.env
pids
logs
results
tmp
npm-debug.log
node_modules
.idea
*.iml
.git
.DS_Store
Thumbs.db
bower_components
bundle.js
coverage
.remote-sync.json
server/*.bundle.js
public/js/bundle*
*.map
// revision manifest
server/rev-manifest.json
server/manifests/*
!server/manifests/README.md
public/js/main*
// public/js/commonFramework*
public/js/sandbox*
public/js/iFrameScripts*
public/js/plugin*
public/js/vendor*
public/js/faux*
server/rev-manifest.json
================================================
FILE: .jshintrc
================================================
{
"node": true, // Enable globals available when code is running inside of the NodeJS runtime environment.
"browser": true, // Standard browser globals e.g. `window`, `document`.
"esnext": true, // Allow ES.next specific features such as `const` and `let`.
"bitwise": false, // Prohibit bitwise operators (&, |, ^, etc.).
"camelcase": false, // Permit only camelcase for `var` and `object indexes`.
"curly": false, // Require {} for every new block or scope.
"eqeqeq": true, // Require triple equals i.e. `===`.
"immed": true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
"latedef": true, // Prohibit variable use before definition.
"newcap": true, // Require capitalization of all constructor functions e.g. `new F()`.
"noarg": true, // Prohibit use of `arguments.caller` and `arguments.callee`.
"regexp": true, // Prohibit `.` and `[^...]` in regular expressions.
"undef": true, // Require all non-global variables be declared before they are used.
"unused": false, // Warn unused variables.
"strict": false, // Require `use strict` pragma in every file.
"trailing": true, // Prohibit trailing whitespaces.
"smarttabs": false, // Suppresses warnings about mixed tabs and spaces
"esnext": true, // Allow ES6 maybe :p
"globals": { // Globals variables.
"jasmine": true,
"angular": true,
"ApplicationConfiguration": true
},
"predef": [ // Extra globals.
"define",
"require",
"exports",
"module",
"describe",
"before",
"beforeEach",
"after",
"afterEach",
"it",
"inject",
"expect"
],
"devel": true, // Allow development statements e.g. `console.log();`.
"noempty": true // Prohibit use of empty blocks.
}
================================================
FILE: .node-inspectorrc
================================================
{
"save-live-edit": true
}
================================================
FILE: .travis.yml
================================================
language: node_js
node_js:
- '4.2.1'
sudo: false
================================================
FILE: CONTRIBUTING.md
================================================
# 贡献者指南
## 我想成为代码贡献者!
We welcome pull requests from Free Code Camp campers (our students) and seasoned JavaScript developers alike! Follow these steps to contribute:
我们欢迎每一位 FreeCodeCamp学员 和 有经验的JavaScript开发人员向我们提交PR!请参照下面这些步骤参与进来:
1. Find an issue that needs assistance by searching for the [Help Wanted](https://github.com/FreeCodeCampChina/freecodecamp.cn/labels/help%20wanted) tag.
通过搜索标记[Help Wanted](https://github.com/FreeCodeCampChina/freecodecamp.cn/labels/help%20wanted) 来找到需要帮助的问题。
2. Let us know you are working on it, by posting a comment on the issue.
在问题下面发送一个评论,便于让我们知道你正在着手解决这个问题。
3. Feel free to ask for help in our [Help Contributors](https://gitter.im/FreeCodeCamp/chinese) Gitter room.
你可以自由地在我们的[Help Contributors](https://gitter.im/FreeCodeCamp/chinese)聊天室提问来获得帮助。
If you've found a bug that is not on the board, [follow these steps](#found-a-bug).
## Contribution Guidelines
1. Fork the project: [How To Fork And Maintain a Local Instance of Free Code Camp](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/How-To-Fork-And-Maintain-a-Local-Instance-of-Free-Code-Camp)
2. Create a branch specific to the issue or feature you are working on. Push your work to that branch. ([Need help with branching?](https://github.com/Kunena/Kunena-Forum/wiki/Create-a-new-branch-with-git-and-manage-branches))
3. Name the branch something like `fix/xxx` or `feature/xxx` where `xxx` is a short description of the changes or feature you are attempting to add. For example `fix/email-login` would be a branch where I fix something specific to email login.
4. [Set up Linting](#linting-setup) to run as you make changes.
5. When you are ready to share your code, run the test suite `npm test` and ensure all tests pass. For Windows contributors, skip the jsonlint pretest run by using `npm run test-challenges`, as jsonlint will always fail on Windows, given the wildcard parameters.
5. Squash your Commits. Ref: [rebasing](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/git-rebase)
6. Submit a [pull request](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Pull-Request-Contribute) from your branch to Free Code Camp's `staging` branch. [Travis CI](https://travis-ci.org/FreeCodeCamp/FreeCodeCamp) will then take your code and run `npm test`. Make sure this passes, then we'll do a quick code review and give you feedback, then iterate from there.
Prerequisites
-------------
- [MongoDB](http://www.mongodb.org/downloads)
- [Node.js](http://nodejs.org)
Getting Started
---------------
Note: If this is your first time working with a node-gyp dependent module, please follow the [node-gyp installation guide](https://github.com/nodejs/node-gyp#installation) to ensure a working npm build.
The easiest way to get started is to clone the repository:
```bash
# Get the latest snapshot
git clone --depth=1 https://github.com/freecodecampchina/freecodecamp.cn.git freecodecamp
# Change directory
cd freecodecamp
# Install NPM dependencies
npm install
# Install Gulp globally
npm install -g gulp
# Install Bower globally
npm install -g bower
# Install Bower dependencies
bower install
```
*Private Environment Variables (API Keys)*
```bash
# Create a copy of the "sample.env" and name it as ".env".
# Populate it with the necessary API keys and secrets:
cp sample.env .env
```
Edit your `.env` file and modify the API keys only for services that you will use.
Note : Not all keys are required, to run the app locally, however `MONGOHQ_URL` is the most important one.
If you only use email login, in addition to `MONGOHQ_URL`, `SESSION_SECRET`, add the `MANDRILL_USER` and `MANDRILL_PASSWORD` API Keys. Not setting these keys will throw an exception when you sign up which you can ignore, you will still be able to login, however you may get these keys [here](https://www.mandrill.com/signup/). Sign up and create a new pair of keys.
You can leave the other keys as they are. Keep in mind if you want to use more services you'll have to get your own API keys for those services and edit those entries accordingly in the `.env` file.
```bash
# Start the mongo server in a separate terminal
mongod
# Initialize Free Code Camp
# This will seed the database for the first time.
# This command should only be run once.
npm run only-once
# start the application
gulp
```
Now navigate to your browser and open http://localhost:3001
If the app loads, congratulations - you're all set. Otherwise, let us know by opening a GitHub issue and with your error.
## Linting Setup
You should have [ESLint running in your editor](http://eslint.org/docs/user-guide/integrations.html), and it will highlight anything doesn't conform to [Free Code Camp's JavaScript Style Guide](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Free-Code-Camp-JavaScript-Style-Guide) (you can find a summary of those rules [here](https://github.com/FreeCodeCamp/FreeCodeCamp/blob/staging/.eslintrc). Please do not ignore any linting errors, as they are meant to **help** you and to ensure a clean and simple code base. Make sure none of your JavaScript is longer than 80 characters per line. The reason we enforce this is because one of our dependent NPM modules, [jsonlint](https://github.com/zaach/jsonlint), does not fully support wildcard paths in Windows.
## Found a bug?
Do not file an issue until you have followed these steps:
1. Read [Help I've Found a Bug](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Help-I've-Found-a-Bug) wiki page and follow the instructions there.
2. Asked for confirmation in the appropriate [Help Room](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Help-Rooms)
3. Please *do not* open an issue without a 3rd party confirmation of your problem.
## Creating Pull Requests
**What is a Pull Request?**
A pull request (PR) is a method of submitting proposed changes to the Free Code Camp Repo (or any Repo, for that matter). You will make changes to copies of the files which make up Free Code Camp in a personal fork, then apply to have them accepted by Free Code Camp proper.
**Need Help?**
Free Code Camp Issue Mods and staff are on hand to assist with Pull Request related issues on our Help Contributors Chat Room
**Methods**
There are two methods of creating a Pull for Free Code Camp:
- Editing files via the GitHub Interface
- Editing files on a local clone
**Important: ALWAYS EDIT ON A BRANCH**
Take away only one thing from this document, it should be this: Never, **EVER** make edits to the `staging` branch. ALWAYS make a new branch BEFORE you edit files. This is critical, because if your PR is not accepted, your copy of staging will be forever sullied and the only way to fix it is to delete your fork and re-fork.
_**Method 1: Editing via your Local Fork (Recommended)**_
This is the recommended method. Read about How to Setup and Maintain a Local Instance of Free Code Camp.
1. Perform the maintenance step of rebasing `staging`.
2. Ensure you are on the `staging` branch using `git status`:
```bash
$ git status
On branch staging
Your branch is up-to-date with 'origin/staging'.
nothing to commit, working directory clean
```
3. If you are not on staging or your working directory is not clean, resolve any outstanding files/commits and checkout staging `git checkout staging`
4. Create a branch off of `staging` with git: `git checkout -B branch/name-here`
**Note:** Branch naming is important. Use a name like `fix/short-fix-description` or `feature/short-feature-description`. Review the [Contribution Guidelines](#contribution-guidelines) for more detail.
5. Edit your file(s) locally with the editor of your choice
6. Check your `git status` to see unstaged files.
7. Add your edited files: `git add path/to/filename.ext` You can also do: `git add .` to add all unstaged files. Take care, though, because you can accidentally add files you don't want added. Review your `git status` first.
8. Commit your edits: `git commit -m "Brief Description of Commit"`
9. Squash your commits, if there are more than one.
10. Push your commits to your GitHub Fork: `git push -u origin branch/name-here`
11. Go to [Common Steps](#common-steps)
_**Method 2: Editing via the GitHub Interface**_
Note: Editing via the GitHub Interface is not recommended, since it is not possible to update your fork via GitHub's interface without deleting and recreating your fork.
Read the [Wiki article](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/How-To-Create-A-Pull-Request-for-Free-Code-Camp#editing-via-the-github-interface) for further information
## Common Steps
1. Once the edits have been committed, you will be prompted to create a pull request on your fork's Github Page.
2. By default, all pull requests should be against the FCC main repo, `staging` branch.
3. Submit a [pull request](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Pull-Request-Contribute) from your branch to Free Code Camp's `staging` branch.
3. The title (also called the subject) of your PR should be descriptive of your changes and succinctly indicates what is being fixed.
- **Do not add the issue number in the PR title**.
- Examples: `Add Test Cases to Bonfire Drop It` `Correct typo in Waypoint Size Your Images`
4. In the body of your PR include a more detailed summary of the changes you made and why.
- If the PR is meant to fix an existing bug/issue, then, at the end of your PR's commit message, append the keyword `closes` and #xxxx (where xxxx is the issue number). Example: `closes #1337`.
This tells GitHub to close the existing issue, if the PR is merged.
5. Indicate if you have tested on a local copy of the site or not.
## Next Steps
**If your PR is accepted**
Once your PR is accepted, you may delete the branch you created to submit it. This keeps your working fork clean.
You can do this with a press of a button on the GitHub PR interface. You can delete the local copy of the branch with: `git branch -D branch/to-delete-name`
**If your PR is rejected**
Don't despair! You should receive solid feedback from the Issue Moderators as to why it was rejected and what changes are needed.
Many Pull Requests, especially first Pull Requests, require correction or updating. If you have used the GitHub interface to create your PR, you will need to close your PR, create a new branch, and re-submit. This is because you cannot squash your commits via the GitHub interface.
If you have a local copy of the repo, you can make the requested changes and amend your commit with: `git commit --amend` This will update your existing commit. When you push it to your fork you will need to do a force push to overwrite your old commit: `git push --force`
Be sure to post in the PR conversation that you have made the requested changes.
##Other resources
- [Searching for Your Issue on Github](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Searching-for-Your-Issue-on-Github)
- [Creating a New Github Issue](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Creating-a-New-Github-Issue)
- [Select Issues for Contributing Using Labels](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Select-Issues-for-Contributing-Using-Labels)
- [How to clone the FreeCodeCamp website on a Windows pc](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/How-to-clone-the-FreeCodeCamp-website-on-a-Windows-pc)
- [How to log in to your local FCC site - using GitHub](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/How-To-Log-In-To-Your-Local-FCC-Site)
- [Contributions Guide - With a demo on fixing a typo](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Contributions-Guide---with-Typo-Demo)
- [Writing great git commit message](https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Writing-great-git-commit-message)
- [Contributor Chat Support - For the FCC Repositories, and running a local instance] (https://gitter.im/FreeCodeCamp/chinese)
================================================
FILE: LICENSE
================================================
BSD 3-Clause License
Copyright (c) 2017, FreeCodeCamp 中国
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: LICENSE-freeCodeCamp-Curriculum.md
================================================
Attribution-ShareAlike 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More_considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution-ShareAlike 4.0 International Public
License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-ShareAlike 4.0 International Public License ("Public
License"). To the extent this Public License may be interpreted as a
contract, You are granted the Licensed Rights in consideration of Your
acceptance of these terms and conditions, and the Licensor grants You
such rights in consideration of benefits the Licensor receives from
making the Licensed Material available under these terms and
conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. BY-SA Compatible License means a license listed at
creativecommons.org/compatiblelicenses, approved by Creative
Commons as essentially the equivalent of this Public License.
d. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
e. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
f. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
g. License Elements means the license attributes listed in the name
of a Creative Commons Public License. The License Elements of this
Public License are Attribution and ShareAlike.
h. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
i. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
j. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
k. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
l. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
m. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. Additional offer from the Licensor -- Adapted Material.
Every recipient of Adapted Material from You
automatically receives an offer from the Licensor to
exercise the Licensed Rights in the Adapted Material
under the conditions of the Adapter's License You apply.
c. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
b. ShareAlike.
In addition to the conditions in Section 3(a), if You Share
Adapted Material You produce, the following conditions also apply.
1. The Adapter's License You apply must be a Creative Commons
license with the same License Elements, this version or
later, or a BY-SA Compatible License.
2. You must include the text of, or the URI or hyperlink to, the
Adapter's License You apply. You may satisfy this condition
in any reasonable manner based on the medium, means, and
context in which You Share Adapted Material.
3. You may not offer or impose any additional or different terms
or conditions on, or apply any Effective Technological
Measures to, Adapted Material that restrict exercise of the
rights granted under the Adapter's License You apply.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material,
including for purposes of Section 3(b); and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.
Creative Commons may be contacted at creativecommons.org.
================================================
FILE: LICENSE-freeCodeCamp-Translation.md
================================================
## creative commons
# Attribution-NonCommercial 4.0 International
Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
### Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
* __Considerations for licensors:__ Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. [More considerations for licensors](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors).
* __Considerations for the public:__ By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. [More considerations for the public](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees).
## Creative Commons Attribution-NonCommercial 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
### Section 1 – Definitions.
a. __Adapted Material__ means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
b. __Adapter's License__ means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
c. __Copyright and Similar Rights__ means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
d. __Effective Technological Measures__ means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
e. __Exceptions and Limitations__ means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
f. __Licensed Material__ means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
g. __Licensed Rights__ means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
h. __Licensor__ means the individual(s) or entity(ies) granting rights under this Public License.
i. __NonCommercial__ means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
j. __Share__ means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
k. __Sui Generis Database Rights__ means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
l. __You__ means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
### Section 2 – Scope.
a. ___License grant.___
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and
B. produce, reproduce, and Share Adapted Material for NonCommercial purposes only.
2. __Exceptions and Limitations.__ For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
3. __Term.__ The term of this Public License is specified in Section 6(a).
4. __Media and formats; technical modifications allowed.__ The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
5. __Downstream recipients.__
A. __Offer from the Licensor – Licensed Material.__ Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
B. __No downstream restrictions.__ You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
6. __No endorsement.__ Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
b. ___Other rights.___
1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this Public License.
3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes.
### Section 3 – License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
a. ___Attribution.___
1. If You Share the Licensed Material (including in modified form), You must:
A. retain the following if it is supplied by the Licensor with the Licensed Material:
i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of warranties;
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License.
### Section 4 – Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only;
b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
### Section 5 – Disclaimer of Warranties and Limitation of Liability.
a. __Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.__
b. __To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.__
c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
### Section 6 – Term and Termination.
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
### Section 7 – Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
### Section 8 – Interpretation.
a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
> Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at [creativecommons.org/policies](http://creativecommons.org/policies), Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
>
> Creative Commons may be contacted at creativecommons.org
================================================
FILE: README.md
================================================

扫码加入 FCC-China 社群
### FreeCodeCampChina's open source codebase and curriculum
freeCodeCamp is a friendly open source community where you learn to code and help nonprofits.
**We help our campers build job-worthy portfolios of real apps used by real people, while helping nonprofits.**
You start by working through our self-paced, browser-based full stack JavaScript curriculum.
### By working through our curriculum, you can earn four certifications:
##### 1. Front End Certification
The first section will teach you the basics of how webpages work and also introduce you to JavaScript programming.
Skills you'll practice include `HTML`, `CSS`, `JavaScript`, `jQuery` and `Bootstrap`.
To earn this certification, you'll build **10 front-end projects** and implement many **JavaScript algorithms**.
##### 2. Data Visualization Certification
The second section builds upon the first and introduces you to more advanced topics such as `Sass`, `React` and `D3`.
To earn this certification, you'll build **5 React-apps** and **5 Data visualization apps** using `D3.js`.
##### 3. Back End Certification
The third section introduces you to back end development using `Node.js`, `Express,` and `MongoDB`. It also teaches you about the important concept of source control using `Git`.
To earn this certification, you'll build **5 APIs** and **5 full stack apps**.
We will accept solutions implemented in _any_ programming language, as long as both a live demo and the source code are publicly accessible.
##### 4. Full Stack Certification
The fourth section is where you'll get **real-world experience** by working on projects for **nonprofits**.
We'll pair you with another camper, an agile project manager, and a stakeholder from a nonprofit organization. Together, you'll plan, build and maintain apps that help that nonprofit carry out its mission more effectively.
For this certification, you'll work on **two projects from scratch** and then **maintain/upgrade two existing projects**.
---
This code is running live at [freeCodeCamp.cn](https://freecodecamp.cn). We also have [Gitter chat rooms](https://gitter.im/FreeCodeCamp/chinese), a [Medium publication](https://medium.freecodecamp.org), an [interactive forum](https://forum.freecodecamp.org), a [wiki knowledgebase](https://forum.freecodecamp.org/c/wiki), and even a [YouTube channel](https://youtube.com/freecodecamp).
### [Join our community here](https://freecodecamp.cn/signin).
Found a bug?
------------
Do not file an issue until you have followed these steps:
1. Read the [Help I've Found a Bug](https://forum.freecodecamp.org/t/how-to-report-a-bug/19543) article and follow its instructions.
2. Ask for confirmation in the appropriate [Help Room](https://forum.freecodecamp.org/t/free-code-camp-official-chat-rooms/19390/2).
3. Please *do not* open an issue without a 3rd party confirmation of your problem.
Contributing
------------
We welcome pull requests from freeCodeCamp campers (our students) and seasoned JavaScript developers alike! Please follow [these steps](CONTRIBUTING.md) to contribute.
License
-------
Copyright (c) 2017 freeCodeCamp.
The content of this repository bound by the following LICENSE(S)
- The computer software is licensed under the [BSD-3-Clause](./LICENSE.md).
- The curricular content as in the `./seed/challenges` or subdirectories and our wiki are licensed under the [CC-BY-SA-4.0](./LICENSE-freeCodeCamp-Curriculum.md)
- The translation of this website follows the license of [CC-BY-NC-4.0](./LICENSE-freeCodeCamp-Translation.md),Do not use (it) for commercial/business purpose.
================================================
FILE: bower.json
================================================
{
"name": "freecodecamp",
"version": "0.0.0",
"homepage": "http://freecodecamp.cn",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"public/bower_components",
"test",
"tests"
],
"dependencies": {
"d3": "~3.5.5",
"jquery": "~2.1.4",
"cal-heatmap": "~3.5.2",
"bootstrap": "~3.3.4",
"font-awesome": "~4.5.0",
"moment": "~2.10.2",
"moment-timezone": "~0.5.0",
"jshint": "~2.9.0",
"lightbox2": "~2.8.1",
"rxjs": "~4.0.6",
"CodeMirror": "~5.8.0",
"chai": "~3.4.1",
"clipboard": "~1.5.5",
"mousetrap": "~1.5.3"
}
}
================================================
FILE: client/README.md
================================================
This is the entry point for the client code.
Code that should run only on the client should be put here.
NOTE(berks): For react specific stuff this should be the entry point
================================================
FILE: client/commonFramework/add-loop-protect.js
================================================
window.common = (function(global) {
const {
loopProtect,
common = { init: [] }
} = global;
loopProtect.hit = function hit(line) {
var err = 'Error: Exiting potential infinite loop at line ' +
line +
'. To disable loop protection, write: \n\\/\\/ noprotect\nas the first' +
'line. Beware that if you do have an infinite loop in your code' +
'this will crash your browser.';
console.error(err);
};
common.addLoopProtect = function addLoopProtect(code = '') {
return loopProtect(code);
};
return common;
})(window);
================================================
FILE: client/commonFramework/bindings.js
================================================
window.common = (function(global) {
const {
$,
Rx: { Observable },
common = { init: [] }
} = global;
common.ctrlEnterClickHandler = function ctrlEnterClickHandler(e) {
// ctrl + enter or cmd + enter
if (
e.keyCode === 13 &&
(e.metaKey || e.ctrlKey)
) {
$('#complete-courseware-dialog').off('keydown', ctrlEnterClickHandler);
if ($('#submit-challenge').length > 0) {
$('#submit-challenge').click();
} else {
window.location = '/challenges/next-challenge?id=' + common.challengeId;
}
}
};
common.init.push(function($) {
var $marginFix = $('.innerMarginFix');
$marginFix.css('min-height', $marginFix.height());
common.submitBtn$ = Observable.fromEvent($('#submitButton'), 'click');
common.resetBtn$ = Observable.fromEvent($('#reset-button'), 'click');
// init modal keybindings on open
$('#complete-courseware-dialog').on('shown.bs.modal', function() {
$('#complete-courseware-dialog').keydown(common.ctrlEnterClickHandler);
});
// remove modal keybinds on close
$('#complete-courseware-dialog').on('hidden.bs.modal', function() {
$('#complete-courseware-dialog').off(
'keydown',
common.ctrlEnterClickHandler
);
});
// video checklist binding
$('.challenge-list-checkbox').on('change', function() {
var checkboxId = $(this).parent().parent().attr('id');
if ($(this).is(':checked')) {
$(this).parent().siblings().children().addClass('faded');
if (!localStorage || !localStorage[checkboxId]) {
localStorage[checkboxId] = true;
}
}
if (!$(this).is(':checked')) {
$(this).parent().siblings().children().removeClass('faded');
if (localStorage[checkboxId]) {
localStorage.removeItem(checkboxId);
}
}
});
$('.checklist-element').each(function() {
var checklistElementId = $(this).attr('id');
if (localStorage[checklistElementId]) {
$(this).children().children('li').addClass('faded');
$(this).children().children('input').trigger('click');
}
});
// video challenge submit
$('#next-courseware-button').on('click', function() {
$('#next-courseware-button').unbind('click');
if ($('.signup-btn-nav').length < 1) {
var data;
var solution = $('#public-url').val() || null;
var githubLink = $('#github-url').val() || null;
switch (common.challengeType) {
case common.challengeTypes.VIDEO:
data = {
id: common.challengeId,
name: common.challengeName,
challengeType: +common.challengeType
};
$.ajax({
url: '/completed-challenge/',
type: 'POST',
data: JSON.stringify(data),
contentType: 'application/json',
dataType: 'json'
})
.success(function(res) {
if (!res) {
return;
}
window.location.href = '/challenges/next-challenge?id=' +
common.challengeId;
})
.fail(function() {
window.location.replace(window.location.href);
});
break;
case common.challengeTypes.BASEJUMP:
case common.challengeTypes.ZIPLINE:
data = {
id: common.challengeId,
name: common.challengeName,
challengeType: +common.challengeType,
solution,
githubLink
};
$.ajax({
url: '/completed-zipline-or-basejump/',
type: 'POST',
data: JSON.stringify(data),
contentType: 'application/json',
dataType: 'json'
})
.success(function() {
window.location.href = '/challenges/next-challenge?id=' +
common.challengeId;
})
.fail(function() {
window.location.replace(window.location.href);
});
break;
case common.challengeTypes.BONFIRE:
window.location.href = '/challenges/next-challenge?id=' +
common.challengeId;
break;
default:
console.log('Happy Coding!');
break;
}
}
});
if (common.challengeName) {
window.ga('send', 'event', 'Challenge', 'load', common.gaName);
}
$('#complete-courseware-dialog').on('hidden.bs.modal', function() {
if (common.editor.focus) {
common.editor.focus();
}
});
$('#trigger-issue-modal').on('click', function() {
$('#issue-modal').modal('show');
});
$('#trigger-help-modal').on('click', function() {
$('#help-modal').modal('show');
});
$('#trigger-reset-modal').on('click', function() {
$('#reset-modal').modal('show');
});
$('#trigger-pair-modal').on('click', function() {
$('#pair-modal').modal('show');
});
$('#completed-courseware').on('click', function() {
$('#complete-courseware-dialog').modal('show');
});
$('#help-ive-found-a-bug-wiki-article').on('click', function() {
window.open(
'https://github.com/freecodecampchina/freecodecamp.cn/wiki/' +
"Help-I've-Found-a-Bug",
'_blank'
);
});
$('#search-issue').on('click', function() {
var queryIssue = window.location.href
.toString()
.split('?')[0]
.replace(/(#*)$/, '');
window.open(
'https://github.com/freecodecampchina/freecodecamp.cn/issues?q=' +
'is:issue is:all ' +
(common.challengeName) +
' OR ' +
queryIssue
.substr(queryIssue.lastIndexOf('challenges/') + 11)
.replace('/', ''), '_blank');
});
});
return common;
}(window));
================================================
FILE: client/commonFramework/code-storage.js
================================================
// depends on: codeUri
window.common = (function(global) {
const {
localStorage,
common = { init: [] }
} = global;
var challengePrefix = [
'Bonfire: ',
'Waypoint: ',
'Zipline: ',
'Basejump: ',
'Checkpoint: '],
item;
var codeStorage = {
getStoredValue(key) {
if (
!localStorage ||
typeof localStorage.getItem !== 'function' ||
!key ||
typeof key !== 'string'
) {
console.log('unable to read from storage');
return '';
}
if (localStorage.getItem(key + 'Val')) {
return '' + localStorage.getItem(key + 'Val');
} else {
for (var i = 0; i <= challengePrefix.length; i++) {
item = localStorage.getItem(challengePrefix[i] + key + 'Val');
if (item) {
return '' + item;
}
}
}
return null;
},
isAlive: function(key) {
var val = this.getStoredValue(key);
return val !== 'null' &&
val !== 'undefined' &&
(val && val.length > 0);
},
updateStorage(key, code) {
if (
!localStorage ||
typeof localStorage.setItem !== 'function' ||
!key ||
typeof key !== 'string'
) {
console.log('unable to save to storage');
return code;
}
localStorage.setItem(key + 'Val', code);
return code;
}
};
common.codeStorage = codeStorage;
return common;
}(window, window.common));
================================================
FILE: client/commonFramework/code-uri.js
================================================
// store code in the URL
window.common = (function(global) {
const {
encodeURIComponent: encode,
decodeURIComponent: decode,
location,
history,
common = { init: [] }
} = global;
const {
replaceScriptTags,
replaceSafeTags,
replaceFormActionAttr,
replaceFccfaaAttr
} = common;
const queryRegex = /^(\?|#\?)/;
function encodeFcc(val) {
return replaceScriptTags(replaceFormActionAttr(val));
}
function decodeFcc(val) {
return replaceSafeTags(replaceFccfaaAttr(val));
}
var codeUri = {
encode: function(code) {
return encode(code);
},
decode: function(code) {
try {
return decode(code);
} catch (ignore) {
return null;
}
},
isInQuery: function(query) {
var decoded = codeUri.decode(query);
if (!decoded || typeof decoded.split !== 'function') {
return false;
}
return decoded
.replace(queryRegex, '')
.split('&')
.reduce(function(found, param) {
var key = param.split('=')[0];
if (key === 'solution') {
return true;
}
return found;
}, false);
},
isAlive: function() {
return codeUri.enabled &&
codeUri.isInQuery(location.search) ||
codeUri.isInQuery(location.hash);
},
getKeyInQuery(query, keyToFind = '') {
return query
.split('&')
.reduce(function(oldValue, param) {
var key = param.split('=')[0];
var value = param
.split('=')
.slice(1)
.join('=');
if (key === keyToFind) {
return value;
}
return oldValue;
}, null);
},
getSolutionFromQuery(query = '') {
return decodeFcc(
codeUri.decode(codeUri.getKeyInQuery(query, 'solution'))
);
},
parse: function() {
if (!codeUri.enabled) {
return null;
}
var query;
if (location.search && codeUri.isInQuery(location.search)) {
query = location.search.replace(/^\?/, '');
if (history && typeof history.replaceState === 'function') {
history.replaceState(
history.state,
null,
location.href.split('?')[0]
);
location.hash = '#?' + encodeFcc(query);
}
} else {
query = location.hash.replace(/^\#\?/, '');
}
if (!query) {
return null;
}
return this.getSolutionFromQuery(query);
},
querify: function(solution) {
if (!codeUri.enabled) {
return null;
}
if (history && typeof history.replaceState === 'function') {
// grab the url up to the query
// destroy any hash symbols still clinging to life
const url = (location.href.split('?')[0]).replace(/(#*)$/, '');
history.replaceState(
history.state,
null,
url +
'#?' +
(codeUri.shouldRun() ? '' : 'run=disabled&') +
'solution=' +
codeUri.encode(encodeFcc(solution))
);
} else {
location.hash = '?solution=' +
codeUri.encode(encodeFcc(solution));
}
return solution;
},
enabled: true,
shouldRun() {
return !this.getKeyInQuery(
(location.search || location.hash).replace(queryRegex, ''),
'run'
);
}
};
common.init.push(function() {
codeUri.parse();
});
common.codeUri = codeUri;
common.shouldRun = () => codeUri.shouldRun();
return common;
}(window));
================================================
FILE: client/commonFramework/create-editor.js
================================================
window.common = (function(global) {
const {
Rx: { Subject, Observable },
CodeMirror,
emmetCodeMirror,
common = { init: [] }
} = global;
const { challengeType = '0', challengeTypes } = common;
if (
!CodeMirror ||
challengeType === challengeTypes.BASEJUMP ||
challengeType === challengeTypes.ZIPLINE ||
challengeType === challengeTypes.VIDEO ||
challengeType === challengeTypes.STEP ||
challengeType === challengeTypes.HIKES
) {
common.editor = {};
return common;
}
var editor = CodeMirror.fromTextArea(
document.getElementById('codeEditor'),
{
lint: true,
lineNumbers: true,
mode: 'javascript',
theme: 'monokai',
runnable: true,
matchBrackets: true,
autoCloseBrackets: true,
scrollbarStyle: 'null',
lineWrapping: true,
gutters: ['CodeMirror-lint-markers']
}
);
editor.setSize('100%', 'auto');
common.editorExecute$ = new Subject();
common.editorKeyUp$ = Observable.fromEventPattern(
(handler) => editor.on('keyup', handler),
(handler) => editor.off('keyup', handler)
);
editor.setOption('extraKeys', {
Tab: function(cm) {
if (cm.somethingSelected()) {
cm.indentSelection('add');
} else {
var spaces = Array(cm.getOption('indentUnit') + 1).join(' ');
cm.replaceSelection(spaces);
}
},
'Shift-Tab': function(cm) {
if (cm.somethingSelected()) {
cm.indentSelection('subtract');
} else {
var spaces = Array(cm.getOption('indentUnit') + 1).join(' ');
cm.replaceSelection(spaces);
}
},
'Ctrl-Enter': function() {
common.editorExecute$.onNext();
return false;
},
'Cmd-Enter': function() {
common.editorExecute$.onNext();
return false;
}
});
var info = editor.getScrollInfo();
var after = editor.charCoords({
line: editor.getCursor().line + 1,
ch: 0
}, 'local').top;
if (info.top + info.clientHeight < after) {
editor.scrollTo(null, after - info.clientHeight + 3);
}
if (emmetCodeMirror) {
emmetCodeMirror(
editor,
{
'Cmd-E': 'emmet.expand_abbreviation',
Tab: 'emmet.expand_abbreviation_with_tab',
Enter: 'emmet.insert_formatted_line_break_only'
}
);
}
common.init.push(function() {
let editorValue;
if (common.codeUri.isAlive()) {
editorValue = common.codeUri.parse();
} else {
editorValue = common.codeStorage.isAlive(common.challengeName) ?
common.codeStorage.getStoredValue(common.challengeName) :
common.seed;
}
editor.setValue(common.replaceSafeTags(editorValue));
editor.refresh();
});
common.editor = editor;
return common;
}(window));
================================================
FILE: client/commonFramework/detect-unsafe-code-stream.js
================================================
window.common = (function(global) {
const {
Rx: { Observable },
common = { init: [] }
} = global;
const detectFunctionCall = /function\s*?\(|function\s+\w+\s*?\(/gi;
const detectUnsafeJQ = /\$\s*?\(\s*?\$\s*?\)/gi;
const detectUnsafeConsoleCall = /if\s\(null\)\sconsole\.log\(1\);/gi;
common.detectUnsafeCode$ = function detectUnsafeCode$(code) {
const openingComments = code.match(/\/\*/gi);
const closingComments = code.match(/\*\//gi);
// checks if the number of opening comments(/*) matches the number of
// closing comments(*/)
if (
openingComments &&
(
!closingComments ||
openingComments.length > closingComments.length
)
) {
return Observable.throw(
new Error('SyntaxError: Unfinished multi-line comment')
);
}
if (code.match(detectUnsafeJQ)) {
return Observable.throw(
new Error('Unsafe $($)')
);
}
if (
code.match(/function/g) &&
!code.match(detectFunctionCall)
) {
return Observable.throw(
new Error('SyntaxError: Unsafe or unfinished function declaration')
);
}
if (code.match(detectUnsafeConsoleCall)) {
return Observable.throw(
new Error('Invalid if (null) console.log(1); detected')
);
}
return Observable.just(code);
};
return common;
}(window));
================================================
FILE: client/commonFramework/display-test-results.js
================================================
window.common = (function({ $, common = { init: [] }}) {
common.displayTestResults = function displayTestResults(data = []) {
$('#testSuite').children().remove();
data.forEach(({ err = false, text = '' }) => {
var iconClass = err ?
'"ion-close-circled big-error-icon"' :
'"ion-checkmark-circled big-success-icon"';
$('