Skip to content

Commit

Permalink
feat: add shareable config, linting, README
Browse files Browse the repository at this point in the history
  • Loading branch information
greatislander committed Oct 27, 2020
1 parent c0b691c commit b876110
Show file tree
Hide file tree
Showing 9 changed files with 6,115 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .eslintrc.json
@@ -0,0 +1,15 @@
{
"extends": "eslint-config-fluid",
"globals": {
"fluid": true
},
"env": {
"browser": true,
"amd": true,
"node": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 6
}
}
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
node_modules
19 changes: 19 additions & 0 deletions AUTHORS.md
@@ -0,0 +1,19 @@
# Authors

## Copyright Holders

Copyright 2020

This is the list of browserslist-config-fluid copyright holders. It does not list all individual contributors because some have assigned
copyright to an institution, only made minor changes, or their contributions no longer appear in the codebase.
Please see the version control system's revision history for details on contributions.

* OCAD University

## Contributors

Individual contributions can be viewed on the
[Contributors](https://github.com/fluid-project/browserslist-config-fluid/graphs/contributors) page, or through the version control
system's revision history.

**Note**: Individual authors may not hold copyright. See above "Copyright Holders" section for more information.
21 changes: 21 additions & 0 deletions Gruntfile.js
@@ -0,0 +1,21 @@
"use strict";

module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
eslint: {
all: ["**/*.js"]
},
jsonlint: {
all: ["*.json", ".*.json"]
}
});

// Load the plugin(s):
grunt.loadNpmTasks("fluid-grunt-eslint");
grunt.loadNpmTasks("grunt-jsonlint");

// Custom tasks:
grunt.registerTask("default", ["lint"]);
grunt.registerTask("lint", "Apply eslint and jsonlint", ["eslint", "jsonlint"]);
};
2 changes: 1 addition & 1 deletion LICENSE → LICENSE.md
@@ -1,4 +1,4 @@
BSD 3-Clause License
# BSD 3-Clause License

Copyright (c) 2020, OCAD University.
All rights reserved.
Expand Down
17 changes: 17 additions & 0 deletions README.md
@@ -1,2 +1,19 @@
# browserslist-config-fluid

Shareable Browserslist config for the Fluid Project.

## Usage

To use the [browserslist](https://github.com/browserslist/browserslist) configuration provided by this module, add it as a dev dependency to your project:

```bash
npm install browserslist-config-fluid --save-dev --save-exact
```

Then, add the following to your project's `package.json` file.

```json
"browserslist": [
"extends browserslist-config-fluid"
]
```
20 changes: 20 additions & 0 deletions index.js
@@ -0,0 +1,20 @@
"use strict";

// Desktop browsers list.
const desktop = [
"last 2 Chrome major versions",
"last 2 Firefox major versions",
"last 2 Safari major versions",
"last 2 Edge major versions"
];

// Mobile browsers list.
const mobile = [
"last 2 ChromeAndroid major versions",
"last 2 iOS major versions"
];

// Combined list.
const browsers = desktop.concat(mobile);

module.exports = browsers;

0 comments on commit b876110

Please sign in to comment.