Skip to content

Commit

Permalink
Merge pull request #56 from agektmr/lit-element
Browse files Browse the repository at this point in the history
Rewrite with lit-element + TypeScript + webpack
  • Loading branch information
agektmr committed Feb 6, 2020
2 parents e32821a + 6efa6e0 commit 9388c66
Show file tree
Hide file tree
Showing 72 changed files with 35,243 additions and 4,901 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": [ "@babel/preset-env" ]
}
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
*.crx
*.pem
.sass-cache
*.sublime*
.DS_Store
*.zip
node_modules
bower_components
lib
app
build
_backup
5 changes: 0 additions & 5 deletions .jscsrc

This file was deleted.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Version 5.0.0
* Mostly quick fix to escape from HTML Imports deprecation. I know there should be many issues, but will fix them gradually.
* Rewrote with TypeScript + lit-element + webpack.

## Version 4.0.2
* Removing linked session has been only unlinking the project and required to then remove the session. It's now unlink and remove the session.
* Badge displays improvement.
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<strong>Important: the latest version of Project Tab Manager is a quick fix for the problem not being able to run this app on Chrome 80 and later. The author knows that there are number of issues to fix, but please be patient until they are fixed. Feel free to contact [the author](mailto:agektmr@gmail.com) if you feel strongly about any issues.</strong>

Project Tab Manager is an extension for Google Chrome that helps you focus on a single project. It preserves each windows as projects, not only you can restore them anytime, you can synchronize projects across different devices using same Chrome profile.

## Getting Started
Expand Down
23 changes: 0 additions & 23 deletions bower.json

This file was deleted.

115 changes: 1 addition & 114 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,114 +1,10 @@
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var del = require('del');
var merge = require('event-stream').merge;
var swig = require('swig');
var path = require('path');
var through = require('through2');
var runSequence = require('run-sequence');

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

gulp.task('styles', function() {
return gulp.src(['styles/**/*.scss'])
.pipe($.debug({title: 'sass'}))
.pipe($.sass().on('error', $.sass.logError))
.pipe(gulp.dest(''));
});

gulp.task('concat', function() {
return merge(
gulp.src([
'src/js/config.js',
'src/js/util.js',
'src/js/idb.js',
'src/js/SessionManager.js',
'src/js/BookmarkManager.js',
'src/js/ProjectManager.js',
'src/js/background.js'
])
.pipe($.concat('background.js'))
.pipe(gulp.dest('app/js/')),

gulp.src([
'src/js/config.js',
'src/js/util.js'
])
.pipe($.concat('popup.js'))
.pipe(gulp.dest('app/js/')),

gulp.src([
'src/js/config.js',
'src/js/util.js'
])
.pipe($.concat('layout.js'))
.pipe(gulp.dest('app/js/')),

gulp.src([
'src/js/util.js',
'src/js/lazy.js'
])
.pipe($.concat('lazy.js'))
.pipe(gulp.dest('app/js/'))
);
});

gulp.task('scripts', ['concat'], function() {
return gulp.src('app/js/*.js')
.pipe($.debug({title: 'scripts'}))
// TODO: Gave up on using uglify for ES6
// .pipe($.uglify())
.pipe(gulp.dest('app/js/'));
});

gulp.task('copy', function() {
return gulp.src([
'src/_locales/**',
'src/img/**',
'src/styles/*.css',
'src/bower_components/**',
'src/manifest.json',
'src/*.html'
], {base: 'src'})
.pipe($.debug({title: 'copy'}))
.pipe(gulp.dest('app'));
});

gulp.task('vulcanize', function() {
return gulp.src('src/elements/*.html')
.pipe($.debug({title: 'vulcanize'}))
.pipe($.vulcanize({
stripComments: true,
inlineCss: true,
inlineScripts: true
}))
.pipe($.rename({prefix: 'vulcanized.'}))
.pipe(gulp.dest('app/elements/'));
});

gulp.task('minify-html', ['vulcanize'], function() {
return gulp.src('app/elements/*.html')
.pipe($.minifyHtml({collapseWhitespace: true, removeComments: true}))
.pipe(gulp.dest('app/elements/'));
});

gulp.task('elements', ['minify-html'], function() {
return gulp.src('app/elements/*.html')
.pipe($.crisper())
.pipe(gulp.dest('app/elements/'));
});

gulp.task('replace', function() {
return gulp.src('app/app.html')
.pipe($.debug({title: 'replace'}))
.pipe($.htmlReplace({
'vulcanized': '<link rel="import" href="elements/vulcanized.app_elems.html">'
}))
.pipe(gulp.dest('app/'));
});

gulp.task('zip', function() {
return gulp.src('app/**/*')
.pipe($.zip('app.zip'))
Expand All @@ -123,7 +19,7 @@ function applyTemplate(templateFile) {
pagetitle: file.path.replace(/^.*\/(.*?)\.html$/, '$1'),
content: file.contents.toString()
};
file.contents = new Buffer(tpl(data), 'utf8');
file.contents = new Buffer.from(tpl(data), 'utf8');
this.push(file);
cb();
});
Expand All @@ -138,16 +34,7 @@ gulp.task('markdown', function() {

gulp.task('build', function() {
runSequence(
'clean',
[
'styles',
'scripts',
'elements'
],
'copy',
'replace',
'markdown',
// 'version',
'zip'
);
});
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a href="/src/demo/">Demos</a>

0 comments on commit 9388c66

Please sign in to comment.