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

Add kitty support and update to node 16 #79

Open
wants to merge 8 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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:21-slim as build

RUN apt-get update && apt-get install -y python3
COPY . /src
WORKDIR /src
RUN npm install
RUN npm run build


FROM nginx:1

RUN apt-get update && apt-get install -y dumb-init
COPY --from=build /src/dist /usr/share/nginx/html
63 changes: 49 additions & 14 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,15 @@ var gulp = require('gulp');
var brfs = require('brfs');
var source = require('vinyl-source-stream');
var connect = require('gulp-connect');
var sass = require('gulp-sass');
var sass = require('gulp-dart-sass');
var autoprefixer = require('gulp-autoprefixer');
var reactify = require('reactify');
var browserify = require('browserify');
var watchify = require('watchify');
var uglify = require('gulp-uglify');
var replace = require('gulp-replace');

gulp.task('default', ['set-version', 'lib', 'style'], function () {
gulp.watch('./stylesheets/**/*.scss', ['style']);

return connect.server({
root: ['dist'],
port: 8000,
livereload: true
});
});

gulp.task('lib', function () {
gulp.task('lib-dev', function () {
var bundler = watchify(browserify({
cache: {},
packageCache: {},
Expand Down Expand Up @@ -52,21 +42,55 @@ gulp.task('lib', function () {
return rebundle();
});

gulp.task('style', function () {
gulp.task('style-dev', function () {
return gulp.src('./stylesheets/main.scss')
.pipe(sass({errLogToConsole: true, outputStyle: 'compressed'}))
.pipe(autoprefixer())
.pipe(gulp.dest('./dist/css'))
.pipe(connect.reload());
});

gulp.task('set-version', function () {
gulp.task('set-version-dev', function () {
return gulp.src('./dist/index.html')
.pipe(replace(/\?v=([\w\.]+)/g, '?v=' + require('./package.json').version))
.pipe(gulp.dest('./dist/'))
.pipe(connect.reload());
});

gulp.task('lib', function () {
var bundler = browserify({
cache: {},
packageCache: {},
fullPaths: true,
extensions: '.jsx'
});

bundler.add('./lib/init.js');
bundler.transform(reactify);
bundler.transform(brfs);

console.log('bundling');
return bundler.bundle()
.on('error', function (err) {
console.log(err.message);
})
.pipe(source('main.js'))
.pipe(gulp.dest('./dist/js'))
});

gulp.task('style', function () {
return gulp.src('./stylesheets/main.scss')
.pipe(sass({errLogToConsole: true, outputStyle: 'compressed'}))
.pipe(autoprefixer())
.pipe(gulp.dest('./dist/css'))
});

gulp.task('set-version', function () {
return gulp.src('./dist/index.html')
.pipe(replace(/\?v=([\w\.]+)/g, '?v=' + require('./package.json').version))
.pipe(gulp.dest('./dist/'))
});

gulp.task('schemes', function () {
var source = 'dist/schemes';
var index = 'index.json';
Expand All @@ -93,3 +117,14 @@ gulp.task('minify', function () {
.pipe(gulp.dest('./dist/js'));
});

gulp.task('build', gulp.series('set-version', 'lib', 'style', 'minify'))

gulp.task('default', gulp.series('set-version-dev', 'lib-dev', 'style-dev', function () {
gulp.watch('./stylesheets/**/*.scss', gulp.series('style-dev'));

return connect.server({
root: ['dist'],
port: 8000,
livereload: true
});
}));
1 change: 1 addition & 0 deletions lib/components/export.react.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ var Export = React.createClass({
<label>Format:</label>
<select ref='select' defaultValue='xresources'>
<option value='alacritty'>Alacritty</option>
<option value='kitty'>Kitty</option>
<option value='chromeshell'>Chrome Secure Shell</option>
<option value='gnome'>Gnome Terminal</option>
<option value='guake'>Guake</option>
Expand Down
Loading