The following guidelines use RFC 2119 to indicate the levels of requirements needed.
You MUST provide a package that resides on either the GitHub Package Registry, or the npm registry. The package SHOULD be marked as private and published under the @github scope. The published package MUST adhere to the following conventions:
The published package MUST have a package.json file. It MUST include the
main keys. It SHOULD include the
type key with a value of
package.json file MAY contain a
style key which MUST point to a valid CSS file within the package. This CSS file MUST follow the restrictions documented below.
package.json file MAY contain an
assets key, which MUST be an array of file names, each pointing to a valid asset within the package. These files SHOULD NOT be CSS or JS files, but MAY be images, svgs, videos, or other types of media.
ES2020](The latest standard can be found here: https://tc39.es/ecma262/).
dependencies key of the
import statements SHOULD use NodeJS style resolutions for "bare specifiers". They MUST use standard resolutions for "relative specifiers".
Function('...'). They MUST follow the CSP rules specified in response headers on github.com.
fetch APIs, etc. Use of these APIs SHOULD NOT be polyfilled, as they are expected to be polyfilled already.
CSS artefacts MUST follow the latest CSS standard. CSS artefacts MUST NOT use alternative CSS syntax such as SCSS, LESS, SASS, etc.
There SHOULD BE only one CSS artefact, and it SHOULD NOT use
@import statements to include other files.
CSS artefacts SHOULD BE minified. There are no additional optimization steps within the monolith so the CSS will be served as-is.
All assets SHOULD BE optimized as there are no additional optimization steps within the monolith, so all assets are served as it. This means running optimizers such as
pngcrush are recommended for packaged assets.
- Images needed by the application should be in
images/in the root of the project.
- CSS should be compiled into a single file
dist/index.cssand should be less than 10kb.
We provide a template repository that you can make a copy of. Most of the restrictions mentioned should be codified within the project and should serve as a good jump off point for you project.