Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaScript implementation #36

Open
9 tasks done
arcticicestudio opened this issue Apr 29, 2017 · 0 comments
Open
9 tasks done

JavaScript implementation #36

arcticicestudio opened this issue Apr 29, 2017 · 0 comments

Comments

@arcticicestudio
Copy link
Contributor

arcticicestudio commented Apr 29, 2017

Technology

It should be implemented using the Babel ES2016 syntax to allow the usage of the latest language features.

Features and Support

The Nord color palette should be implemented as a immutable object via the Object.freeze() method and should not be allowed to rebind using the const keyword.

const NORD = Object.freeze({
/* color constants */
nord0: "#2E3440",
/...
});
//...
export default NORD;

This allows users to import the whole color palette.

import NORD from "nord";

All four color palette components should also be implemented and exported as immutable and not rebindable Object.
The color constants should be initialized with the values of the main NORD object.

export const POLARNIGHT = Object.freeze({
/* "Polar Night" color constants */
nord0 = NORD.nord0,
// ...
});
export const SNOWSTORM = Object.freeze({/* "Snow Storm" color constants */});
export const FROST = Object.freeze({/* "Frost" color constants */});
export const AURORA = Object.freeze({/* "Aurora" color constants */});

This allows users to import only specific parts of the color palette.

import { POLARNIGHT, FROST } from "nord";

Configurations

A .babelrc file should be created to set Babel configurations.

Code Quality

The ESLint configurations should be updated to support the Jest unit tests.

Documentation

All JavaScript sources should be documented via JSDoc.

Unit Tests

Units tests should be implemented using Jest.
This includes the Jest specific configurations in the package.json which also allows to generate code coverage reports.

Build Tools

The gulpfile should be updated to support the building of the JSDocs.

WebStorm

All necessary project files (.idea directory) of the main development IDE should be added to track them via git.

Continuous Integration

The Travis CI- and Circle CI configurations should be updated to support the new implementation.

Process

  • Implement the default module export NORD
  • Implement all color palette components as exported immutable and not rebindable objects
  • Implement Jest unit tests
  • Create a .babelrc configuration dotfile
  • Update the Travis CI- and Circle CI build configurations
  • Add the WebStorm project files
  • Update the ESLint configuration
  • Implement JSDoc gulp tasks
  • Implement Babel JS compilation gulp tasks
@arcticicestudio arcticicestudio self-assigned this Apr 29, 2017
arcticicestudio added a commit to nordtheme/web that referenced this issue Dec 3, 2018
Since the main JavaScript implementation of Nord (1) is currently not
completed and released yet, the colors and palettes will be provided
"manually" via new `nord` and `palettes` modules. As soon as the
implementation has been done they will be replaced through imports from
the official package.

References:
  (1) nordtheme/nord#36

GH-53
@arcticicestudio arcticicestudio removed their assignment Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant