Skip to content

Commit

Permalink
revert changes to remove bower
Browse files Browse the repository at this point in the history
  • Loading branch information
janschoenherr committed Jul 20, 2017
1 parent 1bb1671 commit 4eac9de
Show file tree
Hide file tree
Showing 16 changed files with 519 additions and 245 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "assets"
}
5 changes: 4 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ jobs:
name: Dependencies
command: |
yarn
yarn global add bower
bower --allow-root update
- run:
name: Compile
command: |
mkdir css
yarn run compile
- run:
name: Replace Build Number
Expand All @@ -27,4 +30,4 @@ jobs:
sed -i -- "s/{{BUILD}}/$CIRCLE_BUILD_NUM/g" docs/index.html
- run:
name: Transfer Files
command: rsync -avze "ssh -o StrictHostKeyChecking=no" --delete --include="node_modules" --include "node_modules/uikit" --exclude "yarn.lock" --exclude "migrate.min.js" --exclude "node_modules/*" --exclude "v2" --exclude "fonts" --exclude ".git*" --exclude ".circleci" . $UIKIT_SERVER
command: rsync -avze "ssh -o StrictHostKeyChecking=no" --delete --exclude "yarn.lock" --exclude "migrate.min.js" --exclude "node_modules" --exclude "v2" --exclude "fonts" --exclude ".git*" --exclude ".circleci" . $UIKIT_SERVER
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/node_modules
/assets/uikit
!/assets/google
/css
/fonts
**/app/*.min.js
main.min.js
js/*.min.js
.DS_Store
.idea
2 changes: 1 addition & 1 deletion app/pages/changelog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
mounted() {
$.get('node_modules/uikit/CHANGELOG.md', {nc: Math.random()}, body => {
$.get('assets/uikit/CHANGELOG.md', {nc: Math.random()}, body => {
this.$refs.changelog.innerHTML = this.parse(body);
});
},
Expand Down
2 changes: 1 addition & 1 deletion app/pages/download.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
mounted() {
$.get("https://github.com/uikit/uikit/blob/master/CHANGELOG.md", {nocache: Math.random()}, data => {
$.get("assets/uikit/package.json", {nocache: Math.random()}, data => {
setTimeout(() => {
location.href = `https://github.com/uikit/uikit/releases/download/v${data.version}/uikit-${data.version}.zip`;
}, 100);
Expand Down
2 changes: 1 addition & 1 deletion app/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
}
});
$.get("node_modules/uikit/package.json", {nocache: Math.random()}, data => {
$.get("assets/uikit/package.json", {nocache: Math.random()}, data => {
$("[uikit-version]").text(data.version);
}, 'json');
Expand Down
7 changes: 7 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "uikit-site",
"dependencies": {
"uikit": "^3.0.0"
},
"private": true
}
2 changes: 1 addition & 1 deletion docs/app/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</li>
<li class="uk-nav-divider"></li>
<li v-if="component">
<a :href="'../node_modules/uikit/tests/'+component+'.html'" target="_blank">
<a :href="'../assets/uikit/tests/'+component+'.html'" target="_blank">
<span class="uk-margin-small-right" uk-icon="icon: push"></span>
<span class="uk-text-middle">Open test</span>
</a>
Expand Down
7 changes: 4 additions & 3 deletions docs/app/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ export function openOnCodepen(code) {
return src.indexOf('../docs/') === 0 != -1 ? match.replace(src, `${location.href.split('/docs/')[0]}/docs/${src.replace('../docs/', '')}`) : match;
});

let data = {
let nc = Date.now() % 9999,
data = {
title: '',
description: '',
html: code,
Expand All @@ -92,8 +93,8 @@ export function openOnCodepen(code) {
js_pre_processor: 'none',
js_modernizr: false,
html_classes: '',
css_external: `https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.27/css/uikit.min.css`,
js_external: `https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js;https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.27/js/uikit.min.js;https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.27/js/uikit-icons.min.js`
css_external: `https://getuikit.com/assets/uikit/dist/css/uikit.css?nc=${nc}`,
js_external: `https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js;https://getuikit.com/assets/uikit/dist/js/uikit.js?nc=${nc};https://getuikit.com/assets/uikit/dist/js/uikit-icons.js?nc=${nc}`
};

data = JSON.stringify(data)
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.6/marked.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.2.6/vue.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-router/2.5.1/vue-router.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.27/js/uikit.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.27/js/uikit-icons.min.js" defer></script>
<script src="../assets/uikit/dist/js/uikit.min.js?{{BUILD}}" defer></script>
<script src="../assets/uikit/dist/js/uikit-icons.min.js?{{BUILD}}" defer></script>
<script src="../assets/highlightjs/highlight.min.js" defer></script>
<script src="app/main.min.js?{{BUILD}}" defer></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ npm run watch
```

<script>
$.get("node_modules/uikit/package.json", {nocache: Math.random()}, data => {
$.get("https://getuikit.com/assets/uikit/package.json", {nocache: Math.random()}, data => {
$("pre").each(function(i) {
$(this).html($(this).html().replace(/\[uikit-version\]/g, data.version));
});
Expand Down
8 changes: 4 additions & 4 deletions docs/pages/utility.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ Add the `uk-height-viewport` attribute to create a container that fills the heig
<div uk-height-viewport="expand: true"></div>
```

You can view examples in the tests for [Height Viewport](../node_modules/uikit/tests/height-viewport.html) and [Height Expand](../node_modules/uikit/tests/height-expand.html).
You can view examples in the tests for [Height Viewport](../assets/uikit/tests/height-viewport.html) and [Height Expand](../assets/uikit/tests/height-expand.html).

***

Expand Down Expand Up @@ -610,10 +610,10 @@ Using the `uk-svg` attribute also allows you to inject a symbol from the SVG fil

```example
<!-- Targets the SVG image -->
<img src="../node_modules/uikit/src/images/icons/cloud-download.svg" width="40" height="40" uk-svg>
<img src="../assets/uikit/src/images/icons/cloud-download.svg" width="40" height="40" uk-svg>
<!-- Targets a symbol inside the SVG image -->
<img src="../node_modules/uikit/tests/images/icons.svg#cloud-upload" width="40" height="40" uk-svg>
<img src="../assets/uikit/tests/images/icons.svg#cloud-upload" width="40" height="40" uk-svg>
```

SVGs will adapt the current color for their stroke and fill color. To prevent this behavior, you can add the `uk-preserve` class to the SVG itself or to elements inside the SVG.
Expand Down Expand Up @@ -908,4 +908,4 @@ To apply a move cursor to elements that are being dragged, add the `.uk-drag` cl
</div>
```

To create a box shadow on an [upload area](upload.md) when dragging a file over it, add the `.uk-dragover` class.
To create a box shadow on an [upload area](upload.md) when dragging a file over it, add the `.uk-dragover` class.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.6/marked.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.2.6/vue.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-router/2.5.1/vue-router.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.27/js/uikit.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.27/js/uikit-icons.min.js" defer></script>
<script src="assets/uikit/dist/js/uikit.min.js?{{BUILD}}" defer></script>
<script src="assets/uikit/dist/js/uikit-icons.min.js?{{BUILD}}" defer></script>
<script src="app/main.min.js?{{BUILD}}" defer></script>
</head>

Expand Down
2 changes: 1 addition & 1 deletion less/theme.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// UIkit Core
@import "../node_modules/uikit/src/less/uikit.theme.less";
@import "../assets/uikit/src/less/uikit.theme.less";

// Highlight.js
@import "highlight.less";
Expand Down
27 changes: 22 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,36 @@
{
"scripts": {
"setup": "npm install && npm run compile",
"compile": "npm run compile-js && npm run compile-less",
"setup": "npm install && bower update && npm run compile",
"compile": "npm run compile-js && npm run compile-less && npm run compile-uikit",
"compile-uikit": "cd ./assets/uikit && npm run compile && npm run compile-rtl",
"compile-js": "./node_modules/.bin/webpack -p",
"compile-less": "mkdir -p css && ./node_modules/.bin/lessc less/theme.less > css/theme.css --relative-urls --rootpath=../less/ -x"
},
"devDependencies": {
"buble": "^0.15.1",
"buble-loader": "^0.4.1",
"glob": "^7.0.3",
"html-loader": "^0.4.5",
"json-loader": "^0.5.4",
"less": "^2.7.2",
"mkdirp": "^0.5.1",
"uikit": "^3.0.0-beta",
"unique-id": "0.0.1",
"vue-loader": "^11.3.4",
"vue-template-compiler": "^2.1.8",
"webpack": "^2.6.1"
"webpack": "^2.6.1",

"clean-css": "^4.1.3",
"concat": "^3.0.0",
"minimist": "^1.2.0",
"mkdirp": "^0.5.1",
"postcss": "^6.0.1",
"rollup": "^0.41.6",
"rollup-plugin-buble": "^0.15.0",
"rollup-plugin-html": "^0.2.1",
"rollup-plugin-import-alias": "^1.0.3",
"rollup-plugin-json": "^2.3.0",
"rollup-plugin-replace": "^1.1.1",
"rtlcss": "^2.2.0",
"shortid": "^2.2.8",
"uglify-js": "^3.0.15"
}
}
Loading

0 comments on commit 4eac9de

Please sign in to comment.