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

Bundle jquery.uls and use language-data as dependency #394

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
src/jquery.uls.data.js
src/jquery.uls.data.js
dist/
node_modules/
13 changes: 12 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,19 @@
"wikimedia/client",
"wikimedia/jquery"
],
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"env": {
"es6": true,
"browser": true,
"jquery": true,
"qunit": true,
"node": true
},
"globals": {
"jQuery": "readonly",
"$": "off"
"$": "readonly"
}
}
3 changes: 3 additions & 0 deletions .github/workflows/node-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@ jobs:
- name: Install package.json dependencies
run: npm install

- name: Create a build
run: npm run build

- name: Run QUnit test suite
run: npm run qunit
7 changes: 3 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ module.exports = function ( grunt ) {
},
all: [
'**/*.{js,json,html}',
'!src/jquery.uls.data.js',
'!scripts/jquery.uls.data.template.js',
'!examples/resources/*.min.js',
'!node_modules/**',
'!vendor/**'
'!dist/**'
]
},
stylelint: {
Expand All @@ -27,7 +25,8 @@ module.exports = function ( grunt ) {
},
src: [
'**/*.css',
'!node_modules/**'
'!node_modules/**',
'!dist/**'
]
},
qunit: {
Expand Down
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,6 @@ To run tests locally, run `grunt test`. This will run the tests in PhantomJS.

You can also run the tests in a browser by navigating to the `test/` directory, but first run `grunt` to install the submodules.

Updating language-data
----------------------------------

From the main repo directory, run:

```shell
./scripts/fetch-language-data.sh
```

Coding style
-------------

Expand Down
11 changes: 2 additions & 9 deletions examples/index-i18n.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,13 @@
<meta charset="utf-8">
<title>Universal Language Selector</title>
<meta name="author" content="Santhosh Thottingal">
<link href="../css/jquery.uls.css" rel="stylesheet">
<link href="../css/jquery.uls.grid.css" rel="stylesheet">
<link href="../css/jquery.uls.lcd.css" rel="stylesheet">
<link href="../styles/jquery.uls.css" rel="stylesheet">
<!-- demo -->
<link href="resources/demo.css" rel="stylesheet">
<!-- Libs -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<!-- Source -->
<script src="../src/jquery.uls.data.js"></script>
<script src="../src/jquery.uls.data.utils.js"></script>
<script src="../src/jquery.uls.lcd.js"></script>
<script src="../src/jquery.uls.languagefilter.js"></script>
<script src="../src/jquery.uls.core.js"></script>
<script src="resources/jquery.i18n.min.js"></script>
<script src="../jquery.uls.js"></script>
<script>
$( function () {
var i18n = $.i18n();
Expand Down
11 changes: 2 additions & 9 deletions examples/index-mobile.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,13 @@
<!-- <link rel="apple-touch-icon" href="/apple-touch-icon.png"> -->
<!-- <meta name="description" content=""> -->
<meta name="author" content="Santhosh Thottingal, Pau Giner">
<link href="../css/jquery.uls.css" rel="stylesheet">
<link href="../css/jquery.uls.grid.css" rel="stylesheet">
<link href="../css/jquery.uls.lcd.css" rel="stylesheet">
<link href="../css/jquery.uls.mobile.css" rel="stylesheet">
<link href="../styles/jquery.uls.css" rel="stylesheet">
<!-- demo -->
<link href="resources/demo.css" rel="stylesheet">
<!-- Libs -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<!-- Source -->
<script src="../src/jquery.uls.data.js"></script>
<script src="../src/jquery.uls.data.utils.js"></script>
<script src="../src/jquery.uls.lcd.js"></script>
<script src="../src/jquery.uls.languagefilter.js"></script>
<script src="../src/jquery.uls.core.js"></script>
<script src="../jquery.uls.js"></script>
<script>
$( function () {
$( '.uls-trigger' ).uls( {
Expand Down
10 changes: 2 additions & 8 deletions examples/index-narrow.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,13 @@
<meta charset="utf-8">

<title>Universal Language Selector</title>
<link href="../css/jquery.uls.css" rel="stylesheet">
<link href="../css/jquery.uls.grid.css" rel="stylesheet">
<link href="../css/jquery.uls.lcd.css" rel="stylesheet">
<link href="../styles/jquery.uls.css" rel="stylesheet">
<!-- demo -->
<link href="resources/demo.css" rel="stylesheet">
<!-- Libs -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<!-- Source -->
<script src="../src/jquery.uls.data.js"></script>
<script src="../src/jquery.uls.data.utils.js"></script>
<script src="../src/jquery.uls.lcd.js"></script>
<script src="../src/jquery.uls.languagefilter.js"></script>
<script src="../src/jquery.uls.core.js"></script>
<script src="../jquery.uls.js"></script>
<script>
$( function () {
$( '.uls-trigger' ).uls( {
Expand Down
10 changes: 2 additions & 8 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,13 @@
<!-- <link rel="apple-touch-icon" href="/apple-touch-icon.png"> -->
<!-- <meta name="description" content=""> -->
<meta name="author" content="Santhosh Thottingal">
<link href="../css/jquery.uls.css" rel="stylesheet">
<link href="../css/jquery.uls.grid.css" rel="stylesheet">
<link href="../css/jquery.uls.lcd.css" rel="stylesheet">
<link href="../styles/jquery.uls.css" rel="stylesheet">
<!-- demo -->
<link href="resources/demo.css" rel="stylesheet">
<!-- Libs -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<!-- Source -->
<script src="../src/jquery.uls.data.js"></script>
<script src="../src/jquery.uls.data.utils.js"></script>
<script src="../src/jquery.uls.lcd.js"></script>
<script src="../src/jquery.uls.languagefilter.js"></script>
<script src="../src/jquery.uls.core.js"></script>
<script src="../jquery.uls.js"></script>
<script>
$( function () {
$( '.uls-trigger' ).uls( {
Expand Down
10 changes: 2 additions & 8 deletions examples/limitedLanguageList.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,13 @@

<title>Universal Language Selector</title>
<meta name="author" content="Santhosh Thottingal">
<link href="../css/jquery.uls.css" rel="stylesheet">
<link href="../css/jquery.uls.grid.css" rel="stylesheet">
<link href="../css/jquery.uls.lcd.css" rel="stylesheet">
<link href="../styles/jquery.uls.css" rel="stylesheet">
<!-- demo -->
<link href="resources/demo.css" rel="stylesheet">
<!-- Libs -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<!-- Source -->
<script src="../src/jquery.uls.data.js"></script>
<script src="../src/jquery.uls.data.utils.js"></script>
<script src="../src/jquery.uls.lcd.js"></script>
<script src="../src/jquery.uls.languagefilter.js"></script>
<script src="../src/jquery.uls.core.js"></script>
<script src="../jquery.uls.js"></script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running the examples directly from the root examples directory no longer works. We should update the README.md file to mention that the users should build the files, and then run the examples from the dist/examples folder.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once this PR is done, I plan to create a static application running from dist folder in github pages or netlify or similar places. Along with that I will address this confusion

<script>
$( function () {
$( '.uls-trigger' ).uls( {
Expand Down
10 changes: 2 additions & 8 deletions examples/test-no-results.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,13 @@
<!-- <link rel="apple-touch-icon" href="/apple-touch-icon.png"> -->
<!-- <meta name="description" content=""> -->
<meta name="author" content="Santhosh Thottingal">
<link href="../css/jquery.uls.css" rel="stylesheet">
<link href="../css/jquery.uls.grid.css" rel="stylesheet">
<link href="../css/jquery.uls.lcd.css" rel="stylesheet">
<link href="../styles/jquery.uls.css" rel="stylesheet">
<!-- demo -->
<link href="resources/demo.css" rel="stylesheet">
<!-- Libs -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<!-- Source -->
<script src="../src/jquery.uls.data.js"></script>
<script src="../src/jquery.uls.data.utils.js"></script>
<script src="../src/jquery.uls.lcd.js"></script>
<script src="../src/jquery.uls.languagefilter.js"></script>
<script src="../src/jquery.uls.core.js"></script>
<script src="../jquery.uls.js"></script>
<script>
$( function () {
$( '.uls-trigger' ).uls( {
Expand Down
Loading