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

Environment - full configuration & npm for package managing #5

Merged
merged 9 commits into from
Jun 18, 2021

Conversation

BartoszKlonowski
Copy link
Owner

This pull request adds the full support and full scope of configuration for the package repository.

This contains all the configuration and managing of the npm based package. Everything required for further development is delivered within this PR.
Whole repository and sources were wrapped in the npm based package with the proper package.json and repository information.


New features, tools and configurations done in this implementation are:

  • npm used for package handling
    The npm tool is used to manage and handle all the developer dependencies, node modules and tools used during the development
  • ESLint used for errors and code check
    The configuration is done using the recommended configuration, but it has been extended with the globals to avoid errors when checking the built-in variables (specific for browser extension development).
  • web-ext used for full package build and deployment
    The build and deployment step is not yet implemented, but the tools and environment were decided to be added so that further enhancements will be smoother.
  • CI configuration
    The CI workflow contains three steps: install, verify and build. For more details please check the commit messages.
  • Standarized name for the repository and the package
    It's a common habit to name the npm based packages with the lower-case names separated with dash -.
    Note that the name of the extension is left as it was: "KeepYourSession" but this perhaps will be further reconsidered.

For more information about each change please check the commit messages.

The gitignore is taken from the official GitHub gitignore repository.
The configuration used for this package is the Node.gitignore:
https://github.com/github/gitignore/blob/master/Node.gitignore
It turns out that only the license expressions used from the following
source:
https://spdx.org/licenses/
are correct.
According to that, the "GPL-3.0-or-later" has been set as the specific
license for this package.

NOTE: This issue has been found due to npm used in this repo.
The ESLint configuration is done for JavaScript files only and on the
recommended options and configuration.
Even though all non-checked files are marked as ignored in the
.eslintignore file, still the main check should be launched for the main
source directory:
.\src\**
The CI workflow is divided into three main jobs:
 * install
   installs all the dependencies and caches the output (currently the
   node_modules directory)
 * verify
   runs the ESLint on the sources to verify the standard kept during the
   development and the corrections of the code
 * build (to be implemented)
   This steps builds the package and puts it to the artiffacts, ready to
   be published.
Two errors had to be fixed before delivery:
`e` variable unused
`browser` undefined - this error had to be fixed by setting the
"browser" variable as global for ESLint, due to the fact that in Mozilla
extensions the `browser` is a built in variable and it won't be
recognized as a defined var.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant