Skip to content

Commit

Permalink
refactor(jquery): remove all traces of jquery
Browse files Browse the repository at this point in the history
  • Loading branch information
levithomason committed Aug 21, 2016
1 parent b2e3d68 commit 06380b2
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 90 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,19 @@ Once you change the flag, you need to refresh your browser to see the changes in

## How Can I Help?

Our [CONTRIBUTING.md][1] is a step-by-step setup and development guide. It is meant to be read from top to bottom. Once you're up to speed, we have two areas of focus:
Our [CONTRIBUTING.md][1] is a step-by-step setup and development guide. It is meant to be read from top to bottom. Once you're up to speed, each issue here includes more information on how you can help:

### v1.0 Migrations
### [v1.0 Migrations][15]

Each issue includes more information on how you can help:
Have a look at the task list on the issue to see where you can jump in.

1. [Moving legacy component APIs to our v1 API][15]
1. [Removing jQuery and SUI JS][11]
### [Missing Components][17]

### New Components
We're seeking component parity with Semantic UI, plus some addons. There is an issue for every missing component, labeled `enhancement` `help wanted`. Just comment on the issue you'd like to take.

We're seeking component parity with Semantic UI, plus some addons. There is an issue for every missing component, labeled [`enhancement` `help wanted`][17].
### [Help Wanted Label][4]

Any other issue labeled `help wanted` is ready for a PR.

## Our Principles

Expand Down Expand Up @@ -168,7 +169,7 @@ Made with :heart: [@TechnologyAdvice][9], a ridiculous [place to work][16].
[1]: https://github.com/TechnologyAdvice/stardust/blob/master/CONTRIBUTING.md
[2]: https://technologyadvice.github.io/stardust/
[3]: https://facebook.github.io/react/
[4]: #
[4]: https://github.com/TechnologyAdvice/stardust/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted
[5]: http://semantic-ui.com/
[6]: https://github.com/TechnologyAdvice/stardust/milestone/1
[7]: https://github.com/webpack/webpack-dev-server/
Expand Down
12 changes: 1 addition & 11 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
const { argv } = require('yargs')
const config = require('./config')
const webpack = require('webpack')
const webpackConfig = require('./webpack.config')

const { paths } = config

module.exports = (karmaConfig) => {
karmaConfig.set({
basePath: process.cwd(),
Expand Down Expand Up @@ -51,16 +48,9 @@ module.exports = (karmaConfig) => {
...webpackConfig.module.loaders,
],
}),
plugins: [
...webpackConfig.plugins,
// utils/jquery loads real jQuery and semantic-ui-css
// we alias jquery and semantic-ui-css to mocks during tests
// ignore this module so we can use the mock versions in alias below
new webpack.NormalModuleReplacementPlugin(/lib\/jquery/, 'empty'),
],
plugins: webpackConfig.plugins,
resolve: Object.assign({}, webpackConfig.resolve, {
alias: Object.assign({}, webpackConfig.resolve.alias, {
jquery: `${paths.test('mocks')}/SemanticjQuery-mock.js`,
sinon: 'sinon/pkg/sinon',
// These are internal deps specific to React 0.13 required() by enzyme
// They shouldn't be requiring these at all, issues and fix proposed
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"dependencies": {
"classnames": "^2.1.5",
"debug": "^2.2.0",
"jquery": "^3.1.0",
"lodash": "^4.6.1",
"react-portal": "^2.2.1",
"semantic-ui-css": "^2.2.2"
Expand Down
2 changes: 0 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import './lib/jquery'

export * from './addons'
export * from './collections'
export * from './elements'
Expand Down
32 changes: 0 additions & 32 deletions src/lib/jquery.js

This file was deleted.

2 changes: 0 additions & 2 deletions src/modules/Dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -703,8 +703,6 @@ export default class Dropdown extends Component {
return <div className={classes}>{_text}</div>
}

// TODO hidden input only exists for backwards compatibility with SUI jQuery plugins
// remove once those are removed
renderHiddenInput = () => {
debug('renderHiddenInput()')
const { value } = this.state
Expand Down
30 changes: 0 additions & 30 deletions test/mocks/SemanticjQuery-mock.js

This file was deleted.

3 changes: 0 additions & 3 deletions test/mocks/jQueryLoader-mock.js

This file was deleted.

1 change: 0 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ webpackConfig.plugins = [
versions: {
sui: require('semantic-ui-css/package.json').version,
faker: require('faker/package.json').version,
jquery: require('jquery/package.json').version,
lodash: require('lodash/package.json').version,
},
}),
Expand Down

0 comments on commit 06380b2

Please sign in to comment.