Skip to content

Commit

Permalink
Remove no-longer-used jquery! and Promise! plugins.
Browse files Browse the repository at this point in the history
- jquery! - we are using [polyfilled] native methods instead
- Promise! - we are using the native or polyfilled Promise class instead
  • Loading branch information
wkeese committed Jul 27, 2020
1 parent d950834 commit 8a7628e
Show file tree
Hide file tree
Showing 29 changed files with 159 additions and 647 deletions.
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

146 changes: 146 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
{
"env": {
"browser": true,
"amd": true
},
"parserOptions": {
"ecmaVersion": 5
},
"globals": {
"console": false,
"define": false,
"document": false,
"intern": false,
"process": false,
"Promise": false
},
"rules": {
"semi": [
"error",
"always"
],
"no-bitwise": 0,
"no-cond-assign": 0,
"camelcase": 2,
"curly": 2,
"no-debugger": 0,
"eqeqeq": 2,
"no-eq-null": 2,
"no-eval": 0,
"no-unused-expressions": 2,
"guard-for-in": 0,
"block-scoped-var": 2,
"strict": 0,
"comma-dangle": [
"error",
"never"
],
"lines-around-directive": [
"error",
{
"before": "never",
"after": "always"
}
],
"object-curly-newline": [
"error",
{
"consistent": true
}
],
"object-property-newline": [
"error",
{
"allowAllPropertiesOnSameLine": true
}
],
"wrap-iife": [
2,
"any"
],
"keyword-spacing": [
"error",
{
"before": true
}
],
"key-spacing": [
"error",
{
"beforeColon": false
}
],
"no-iterator": 0,
"no-use-before-define": 0,
"comma-style": [
2,
"last"
],
"space-before-blocks": [
2,
"always"
],
"space-before-function-paren": [
2,
"always"
],
"no-trailing-spaces": [
2,
{
"skipBlankLines": true
}
],
"space-infix-ops": [
2,
{
"int32Hint": false
}
],
"no-mixed-spaces-and-tabs": 2,
"no-loop-func": 2,
"no-multi-str": 0,
"new-cap": 2,
"no-caller": 2,
"no-empty": 0,
"no-new": 2,
"no-plusplus": 0,
"no-proto": 0,
"no-script-url": 2,
"no-shadow": 2,
"dot-notation": 2,
"no-new-func": 0,
"no-new-wrappers": 0,
"no-undef": 2,
"no-unused-vars": 2,
"no-with": 0,
"max-len": [
2,
{
"code": 120,
"ignoreComments": true
}
],
"indent": [
"error",
"tab"
],
"quotes": [
"error",
"double",
{
"avoidEscape": true
}
],
"quote-props": [
"error",
"consistent-as-needed",
{
"keywords": true
}
],
"complexity": [
2,
20
]
}
}
2 changes: 1 addition & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@
"maxlen": 120,
"indent": 4,
"maxerr": 250,
"predef": [ "require", "define", "module", "intern", "requirejs" ],
"predef": [ "require", "define", "module", "intern", "requirejs", "Promise" ],
"maxcomplexity": 10
}
4 changes: 1 addition & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ module.exports = function (grunt) {
clean: {
// Delete files created by the "testBuild" target.
testBuild: [
"tests/functional/jqueryApp/{bower_components,node_modules,build,tmp}",
"tests/functional/cssApp/{bower_components,node_modules,build,tmp}"
]
}
Expand Down Expand Up @@ -143,7 +142,7 @@ module.exports = function (grunt) {

// Testing.
// Always specify the target e.g. grunt test:remote, grunt test:remote.
// For more control, run testBuild:css and testBuild:jquery manually, then
// For more control, run testBuild:css manually, then
// directly call "npx intern".
var testTaskDescription = "Run this task instead of the intern task directly! \n" +
"Always specify the test target e.g. \n" +
Expand All @@ -152,7 +151,6 @@ module.exports = function (grunt) {
grunt.registerTask("test", testTaskDescription, function (target) {
// First create the test builds. These are referenced from the intern tests.
grunt.task.run("testBuild:css");
grunt.task.run("testBuild:jquery");

// Then run the intern tests.
grunt.task.run("run:intern-" + target);
Expand Down
51 changes: 0 additions & 51 deletions Promise.js

This file was deleted.

30 changes: 2 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,23 @@ Set of AMD plugins for RequireJS. It contains the following plugins:
* [css](#css)
* [has](#has)
* [i18n](#i18n)
* [jquery](#jquery)
* [maybe](#maybe)
* [Promise](#promise)
* [svg](#svg)

## Status

No official release yet.

## Migration

## Licensing

This project is distributed by the Dojo Foundation and licensed under the ["New" BSD License](./LICENSE).
All contributions require a [Dojo Foundation CLA](http://dojofoundation.org/about/claForm).

## Installation

_Bower_ release installation:

$ bower install requirejs-dplugins

_Manual_ master installation:

$ git clone git://github.com/ibm-js/requirejs-dplugins.git

Then install dependencies with bower (or manually from github if you prefer to):
_Npm_ release installation:

$ cd requirejs-dplugins
$ bower install

When using the jQuery plugin, in order to be able to load jQuery modules, you must manually include jQuery into
your app via `bower install jquery` or via a script tag (ex: `<script src="https://code.jquery.com/jquery-2.1.1.min.js">`).
$ npm install requirejs-dplugins

## css
This plugin will load and wait for a css file. CSS loaded with this plugin can be overwritten by
Expand All @@ -56,21 +40,11 @@ This plugin provides an API to handle string translation.

See [docs/i18n.md](./docs/i18n.md) and [samples/i18n.html](./samples/i18n.html) for documentation and sample.

## jquery
This plugin loads the specified jQuery modules if they are not loaded already.

See [docs/jquery.md](./docs/jquery.md) for documentation.

## maybe
This plugin allows to require modules that may or may not exist.

See [docs/maybe.md](./docs/maybe.md) and [samples/maybe.html](./samples/maybe.html) for documentation and sample.

## Promise
This plugin provides an ES6 Promise implementation. If the browser does not provide ES6 Promise, it provides a shim.

See [docs/Promise.md](./docs/Promise.md) for documentation.

## svg
This plugin loads an svg graphic and defines it in the DOM, so you can reference it in a `<use>` tag.

Expand Down
30 changes: 0 additions & 30 deletions bower.json

This file was deleted.

5 changes: 2 additions & 3 deletions css.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@

define([
"./has",
"./Promise!",
"module"
], function (has, Promise, module) {
], function (has, module) {
"use strict";

has.add("event-link-onload-api", function (global) {
Expand All @@ -45,7 +44,7 @@ define([
/**
* Return a promise that resolves when the specified link has finished loading.
* @param {HTMLLinkElement} link - The link element to be notified for.
* @returns {module:jQuery/Promise} - A promise.
* @returns {Promise} - A promise.
* @private
*/
var listenOnLoad = function (link) {
Expand Down
Loading

0 comments on commit 8a7628e

Please sign in to comment.