Skip to content

Commit

Permalink
chore: move to NPM
Browse files Browse the repository at this point in the history
  • Loading branch information
Clément PREVOT committed Dec 11, 2017
1 parent 3c68e7d commit 7002726
Show file tree
Hide file tree
Showing 13 changed files with 127 additions and 114 deletions.
4 changes: 2 additions & 2 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"directory": "libs"
}
"directory": "node_modules"
}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@ $RECYCLE.BIN/
config.codekit

# Python
*.pyc
*.pyc

# Yarn lock file
yarn.lock
Empty file added .npmignore
Empty file.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014 LumApps
Copyright (c) 2017 LumApps

Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Three quick start options are available:

- [Download the latest release][release].
- Clone the repo: `git clone https://github.com/lumapps/lumx.git`.
- Install with Bower: `bower install lumx`.
- Install with NPM: `npm install official-lumx` (or Yarn: `yarn add official-lumx`).

## Documentation

Expand All @@ -24,23 +24,22 @@ For example, using bash in a Unix system with the default path will need to edit
```bash
export APPENGINE=/home/USER/google-cloud-sdk/bin/
```
3. Run `npm install & bower install`.
4. Run `./launch.sh`.
5. Visit [http://localhost:8888][local] in your browser, and voilà.

#### or
Then install all dependencies:

1. Run `npm install & bower install`.
2. Run `gulp serve`.
3. Visit [http://localhost:8080][local] in your browser, and voilà.
* Run `npm install` (or `yarn install`).

#### or (using docker)
Then run the build system and the server:

1. Run `npm install & bower install`.
2. Run `gulp watch`.
3. Run `./dlaunch.sh`
1. Run `gulp`.
2. In an other terminal, run `./launch.sh` (or `./dlaunch.sh` if you want to use Docker, recommended on MacOS X).
3. Visit [http://localhost:8888][local] in your browser, and voilà.

#### or

1. Run `gulp serve`.
2. Visit [http://localhost:8080][local] in your browser, and voilà.

## How to get help, contribute, or provide feedback

Please refer to our [contributing guidelines](CONTRIBUTING.md). The roadmap is available in [this repo](ROADMAP.md).
Expand Down
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "lumx",
"description": "The first responsive front-end framework based on AngularJS & Google Material Design specifications",
"kewords": [
"keywords": [
"AngularJS",
"Material Design",
"Framework"
],
"homepage": "http://ui.lumapps.com",
"version": "0.0.0",
"homepage": "https://ui.lumapps.com",
"version": "1.6.19",
"authors": [
"LumApps"
],
Expand Down
9 changes: 1 addition & 8 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ if [ $? != 0 ]; then
fi

gulp clean
rm -rf libs

bower install --allow-root
if [ $? != 0 ]; then
echo "Error during bower install"
exit -3
fi

gulp build
if [ $? != 0 ]; then
Expand All @@ -54,4 +47,4 @@ gulp demo
if [ $? != 0 ]; then
echo "Error during gulp demo"
exit -7
fi
fi
6 changes: 3 additions & 3 deletions demo/includes/getting-started/customization/main.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "settings/common";
@import "../bower_components/lumx/dist/scss/lumx";
...
@import "../node_modules/official-lumx/dist/scss/lumx";

...
6 changes: 3 additions & 3 deletions demo/includes/getting-started/installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ <h1 class="main-section__title">Installation</h1>

<lx-component lx-title="Use LumX in your project" lx-no-demo="true">
<p>
LumX is available through Bower:<br />
<code>bower install lumx</code>
LumX is available through NPM:<br />
<code>npm install official-lumx</code>
</p>

<p>
Don’t use bower?<br />
Don’t use NPM?<br />
You first need to download all these dependencies:
</p>

Expand Down
14 changes: 7 additions & 7 deletions demo/includes/getting-started/installation/include.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!-- Head -->
<link rel="stylesheet" href="bower_components/lumx/dist/lumx.css">
<link rel="stylesheet" href="node_modules/official-lumx/dist/lumx.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700">

<!-- Before body closing tag -->
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/velocity/velocity.js"></script>
<script src="bower_components/moment/min/moment-with-locales.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/lumx/dist/lumx.js"></script>
<script src="node_modules/jquery/dist/jquery.js"></script>
<script src="node_modules/velocity-animate/velocity.js"></script>
<script src="node_modules/moment/min/moment-with-locales.js"></script>
<script src="node_modules/angular/angular.js"></script>
<script src="node_modules/lumx/dist/lumx.js"></script>
2 changes: 1 addition & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

<!-- Libs -->
<script src="/libs/jquery/dist/jquery.js"></script>
<script src="/libs/velocity/velocity.js"></script>
<script src="/libs/velocity-animate/velocity.js"></script>
<script src="/libs/moment/min/moment-with-locales.js"></script>

<!-- Angular -->
Expand Down
62 changes: 28 additions & 34 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
var gulp = require('gulp'),
path = require('path'),
minimist = require('minimist'),
summary = require('jshint-summary'),
del = require('del'),
plugins = require('gulp-load-plugins')();

var paths = {
js: [
'core/js/**/*.js',
'modules/**/*.js'
'modules/**/*.js',
],
distJs: [
'core/js/**/*.js',
Expand All @@ -17,7 +16,7 @@ var paths = {
],
scss: [
'core/scss/**/*.scss',
'modules/**/*.scss'
'modules/**/*.scss',
],
templates: [
'build/js/templates/dropdown_template.js',
Expand All @@ -40,28 +39,27 @@ var paths = {
demo: [
'demo/**/*',
'!demo/scss/**/*',
'!demo/scss'
'!demo/scss',
],
examples: [
'modules/**/demo/**/*.html'
'modules/**/demo/**/*.html',
],
libs: [
'libs/**/*'
'node_modules/angular/**/*',
'node_modules/angular-ui-router/**/*',
'node_modules/angular-highlightjs/**/*',
'node_modules/jquery/**/*',
'node_modules/velocity-animate/**/*',
'node_modules/moment/**/*',
'node_modules/bourbon/**/*',
'node_modules/mdi/**/*',
'node_modules/sass-mq/**/*',
]
};

function watcherWithCache(name, src, tasks)
{
var watcher = gulp.watch(src, tasks);

watcher.on('change', function(event)
{
if (event.type === 'deleted')
{
delete plugins.cached.caches.scripts[event.path];
plugins.remember.forget(name, event.path);
}
});
}

var knownOptions = {
Expand All @@ -75,27 +73,22 @@ var knownOptions = {
var options = minimist(process.argv.slice(2), knownOptions);

// Clean
gulp.task('clean:build', function(cb)
gulp.task('clean:build', function()
{
del(['build/*'], cb);
return del(['build/**']);
});

gulp.task('clean:dist', function(cb)
gulp.task('clean:dist', function()
{
del(['dist/*'], cb);
return del(['dist/**']);
});


// Develop
gulp.task('lint', function()
gulp.task('js', function()
{
return gulp.src(paths.js)
.pipe(plugins.plumber())
.pipe(plugins.cached('lint'))
.pipe(plugins.jshint())
.pipe(plugins.jshint.reporter('jshint-summary'))
.pipe(plugins.jshint.reporter('fail'))
.pipe(plugins.remember('lint'))
.pipe(plugins.rename(function(p)
{
p.dirname = p.dirname.replace(path.normalize('/js'), '');
Expand All @@ -109,14 +102,15 @@ gulp.task('scss', function()
.pipe(plugins.plumber())
.pipe(plugins.sass(
{
includePaths: ['libs/bourbon/app/assets/stylesheets/', 'libs/mdi/scss/', 'libs/sass-mq/']
includePaths: ['node_modules/bourbon/app/assets/stylesheets/', 'node_modules/mdi/scss/', 'node_modules/sass-mq/']
}))
.pipe(gulp.dest('build'));
});

gulp.task('fonts', function()
{
return gulp.src('libs/mdi/fonts/**')
return gulp.src('node_modules/mdi/fonts/**')
.pipe(plugins.plumber())
.pipe(gulp.dest('build/fonts'));
});

Expand All @@ -140,7 +134,7 @@ gulp.task('examples', function()

gulp.task('libs', function()
{
return gulp.src(paths.libs)
return gulp.src(paths.libs, { base : 'node_modules' })
.pipe(plugins.plumber())
.pipe(gulp.dest('build/libs'));
});
Expand Down Expand Up @@ -178,20 +172,20 @@ gulp.task('dist:css', ['scss:paths'], function()
.pipe(plugins.rename('lumx.scss'))
.pipe(plugins.sass(
{
includePaths: ['libs/bourbon/app/assets/stylesheets/', 'libs/mdi/scss/', 'libs/sass-mq/']
includePaths: ['node_modules/bourbon/app/assets/stylesheets/', 'node_modules/mdi/scss/', 'node_modules/sass-mq/']
}))
.pipe(plugins.replace(/\.\.\/fonts/g, './fonts'))
.pipe(plugins.minifyCss(
.pipe(plugins.cleanCss(
{
keepSpecialComments: 0
specialComments: 0
}))
.pipe(plugins.insert.prepend('/*\n LumX ' + options.version + '\n (c) 2014-' + new Date().getFullYear() + ' LumApps http://ui.lumapps.com\n License: MIT\n*/\n'))
.pipe(gulp.dest('dist'));
});

gulp.task('dist:fonts', function()
{
return gulp.src('libs/mdi/fonts/**')
return gulp.src('node_modules/mdi/fonts/**')
.pipe(gulp.dest('dist/fonts'));
});

Expand Down Expand Up @@ -426,7 +420,7 @@ gulp.task('serve', ['watch'], function()

gulp.task('watch', ['build'], function()
{
watcherWithCache('lint', paths.js, ['lint']);
watcherWithCache('js', paths.js, ['js']);
watcherWithCache('scss', [paths.scss, 'demo/scss/**/*.scss'], ['scss']);
watcherWithCache('demo', paths.demo, ['demo']);
watcherWithCache('examples', paths.examples, ['examples']);
Expand All @@ -451,7 +445,7 @@ gulp.task('watch', ['build'], function()

gulp.task('clean', ['clean:build', 'clean:dist']);

gulp.task('build', ['lint', 'scss', 'fonts', 'demo', 'examples', 'libs', 'tpl:dropdown', 'tpl:file-input', 'tpl:text-field', 'tpl:search-filter', 'tpl:select', 'tpl:tabs', 'tpl:date-picker', 'tpl:progress', 'tpl:button', 'tpl:checkbox', 'tpl:radio-button', 'tpl:switch', 'tpl:stepper', 'tpl:fab', 'tpl:icon', 'tpl:data-table']);
gulp.task('build', ['js', 'scss', 'fonts', 'demo', 'examples', 'libs', 'tpl:dropdown', 'tpl:file-input', 'tpl:text-field', 'tpl:search-filter', 'tpl:select', 'tpl:tabs', 'tpl:date-picker', 'tpl:progress', 'tpl:button', 'tpl:checkbox', 'tpl:radio-button', 'tpl:switch', 'tpl:stepper', 'tpl:fab', 'tpl:icon', 'tpl:data-table']);
gulp.task('dist', ['clean:dist'], function()
{
gulp.start('dist:css');
Expand Down
Loading

0 comments on commit 7002726

Please sign in to comment.