Commit 8123d21a authored by Pouya Kary's avatar Pouya Kary

INIT

parents
_compiled/*
_release/*
_documentation/*
node_modules/*
npm-debug.log
www/*
\ No newline at end of file
// cSpell Settings
{
// Version of the setting file. Always 0.1
"version": "0.1",
// language - current active spelling language
"language": "en",
// words - list of words to be always considered correct
"words": [
"Pouya",
"Kary",
"karyfoundation",
"Toolbar",
"Selectbox",
"Eulerian",
"newdot",
"newdotat",
"newdots",
"howmuch",
"getdot",
"getdots",
"foreachdot",
"foralldots",
"graphfrommatrix",
"countdots",
"movex",
"movey",
"movebx",
"moveby",
"Sortings",
"eulerianpath",
"euleriancycle",
"Micha",
"Hanselmann",
"Sina",
"Bakhtiari",
"posx",
"FIXME",
"Line's",
"mkdirp",
"Standalone",
"onresize",
"prismjs",
"Script's",
"subdirs"
],
// flagWords - list of words to be always considered incorrect
// This is useful for offensive words and common spelling errors.
// For example "hte" should be "the"
"flagWords": [
"hte"
]
}
\ No newline at end of file
{
"version": "0.1.0",
"command": "gulp",
"isShellCommand": false,
"args": [
"--no-color"
],
"tasks": [
{
"taskName": "default",
"isBuildCommand": true,
"showOutput": "silent"
}
]
}
\ No newline at end of file
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug",
"type": "chrome",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
"runtimeArgs": [
"${workspaceRoot}/_compiled/main.js",
"--enable-logging",
"--remote-debugging-port=9222"
],
"sourceMaps": false
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858,
"sourceMaps": false,
"outDir": null
}
]
}
\ No newline at end of file
{
"editor.tabSize": 4,
"editor.wrappingColumn": 0,
"editor.quickSuggestionsDelay": 0,
"editor.insertSpaces": true,
"alex.enable": true
}
\ No newline at end of file
{
"version": "0.1.0",
"command": "bash",
"isShellCommand": false,
"args": [ "build.sh" ],
"showOutput": "never",
"echoCommand": false
}
\ No newline at end of file
This diff is collapsed.
_compiled @ 795cc17f
Subproject commit 795cc17f61a6977fd760aa09ba120731b2f05059
gulp
cd ./_compiled
electron main.js
cd ..
//
// Copyright 2016 Kary Foundation, Inc.
// Author: Pouya Kary <k@karyfoundation.org>
//
'use strict';
//
// ─── DEFS ───────────────────────────────────────────────────────────────────────
//
const electron = require( 'electron' );
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
//
// ─── GENERATE MAIN WINDOW ───────────────────────────────────────────────────────
//
let mainWindow;
function createWindow ( ) {
const window_width = 1100;
const window_height = 640;
mainWindow = new BrowserWindow({
width: window_width, minWidth: window_width - 150,
height: window_height, minHeight: window_height - 100,
backgroundColor: 'white'
});
//mainWindow.openDevTools( );
mainWindow.loadURL( 'file://' + __dirname + '/index.html' );
mainWindow.on( 'closed' , function( ) {
mainWindow = null;
app.quit( );
});
}
//
// ─── ON READY ───────────────────────────────────────────────────────────────────
//
app.on( 'ready' , createWindow );
// ────────────────────────────────────────────────────────────────────────────────
//
// Copyright 2016 Kary Foundation, Inc.
// Author: Pouya Kary <k@karyfoundation.org>
//
//
// ─── IMPORTS ────────────────────────────────────────────────────────────────────
//
var gulp = require('gulp');
var exec = require('child_process').exec;
var util = require('util');
var fs = require('fs-extra');
var path = require('path');
var ugly = require('gulp-uglify');
var less = require('less');
var mv = require('mv');
//
// ─── P ──────────────────────────────────────────────────────────────────────────
//
function p ( message ) {
console.log( message );
}
//
// ─── CONSTS ─────────────────────────────────────────────────────────────────────
//
const resultDirPath = '_compiled';
//
// ─── TOOLS ──────────────────────────────────────────────────────────────────────
//
/** Run shell commands easy! */
function shell ( command , callback ) {
exec( command, err => {
if ( err ) return callback( err );
callback( );
});
}
//
// ─── COPY DIR FILES ─────────────────────────────────────────────────────────────
//
/** Copy to binary from dir */
function copyToBinaryFromDir ( dir ) {
fs.readdir( dir , ( err , files ) => {
// if error
if ( err ) {
console.log(`Could not get files from directory ${ dir }`);
}
// if right
files.forEach( name => {
copyFile(
getLocalPath( path.join( dir , name ) ),
getLocalPath( path.join( resultDirPath , name ) )
);
});
});
}
//
// ─── COPY SINGLE FILE ───────────────────────────────────────────────────────────
//
/** Copy file `A` to `B` */
function copyFile ( A, B ) {
if ( /\.DS_Store/.test( A ) ) {
return;
}
fs.copy( A, B, err => {
if ( err ) {
console.log(`Could not copy file ${ A }`);
}
});
}
//
// ─── GET LOCAL PATH ─────────────────────────────────────────────────────────────
//
/** Get Local Path in the current directory */
function getLocalPath ( address ) {
return path.join( __dirname , address );
}
//
// ─── COPY FILES ─────────────────────────────────────────────────────────────────
//
/** Copies static resource files into the result directory */
gulp.task( 'copyResourceFiles', callback => {
copyToBinaryFromDir( 'resources' );
copyToBinaryFromDir( 'view' );
copyToBinaryFromDir( 'electron' );
copyToBinaryFromDir( 'regman' );
callback();
});
//
// ─── SHEETS ─────────────────────────────────────────────────────────────────────
//
/** Compiles the Less style sheets */
gulp.task( 'sheets', callback => {
try {
let lessSourceCode = fs.readFileSync(
path.join( __dirname, 'sheets', 'ui.less' ), 'utf8' );
less.render( lessSourceCode, ( err, output ) => {
if ( err ) {
console.log(`Less failure: ${ err }`); return;
}
fs.writeFile(
path.join( __dirname, '_compiled/style.css' ),
output.css,
error => {
if ( error ) {
console.log('could not store the less file');
} else {
console.log('compiled less source codes successfully...');
callback();
}
}
);
});
} catch ( err ) {
console.log('Compiling less failed ' + err );
}
});
//
// ─── MAIN ───────────────────────────────────────────────────────────────────────
//
/** Where everything starts */
gulp.task( 'default', ['copyResourceFiles', 'sheets']);
// ────────────────────────────────────────────────────────────────────────────────
\ No newline at end of file
lessc sheets/ui.less _compiled/style.css
\ No newline at end of file
{
"name": "regstudio",
"productName": "RegStudio",
"author": "Kary Foundation",
"main": "main.js",
"description": "RegEx done right",
"homepage": "https://github.com/karyfoundation/regman",
"license": "Apache-2.0",
"version": "0.1.0",
"scripts": {
"start": "electron ./_compiled/main.js --enable-logging"
},
"repository": {
"type": "git",
"url": "https://github.com/karyfoundation/regman"
},
"dependencies": { },
"devDependencies": {
"electron-builder": "^5.30.0",
"electron-packager": "^7.7.0",
"electron-prebuilt": "^1.3.3",
"fs-extra": "0.30.0",
"gulp": "3.9.1",
"gulp-cli": "1.2.1",
"gulp-uglify": "1.5.3",
"less": "2.7.1",
"mv": "^2.1.1",
"sloc": "0.1.10",
}
}
regman @ 795cc17f
Subproject commit 795cc17f61a6977fd760aa09ba120731b2f05059
This diff is collapsed.
//
// Copyright 2016 Kary Foundation, Inc.
// Author: Pouya Kary <k@karyfoundation.org>
//
//
// ─── INCLUDES ───────────────────────────────────────────────────────────────────
//
@import 'globals';
//
// ─── BASE ───────────────────────────────────────────────────────────────────────
//
html {
background-color: @color-1;
font-family: @font-sans-serif;
font-size: @base-font-size;
overflow: hidden;
min-height: 400px;
min-width: 300px;
}
body {
margin: 0;
}
:focus {
outline-color: transparent;
outline-style: none;
}
input {
font-size: 1rem;
}
//
// ─── UNSELECTABLE ───────────────────────────────────────────────────────────────
//
.unselectable {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
//
// ─── LOADING VIEW ───────────────────────────────────────────────────────────────
//
#loading-view {
position: fixed;
top: 0;
left: 0;
padding-top: ~'calc( 50vh - 60px )';
height: 100vh;
width: 100vw;
background-color: white;
color: @kary-light-red;
font-size: 3rem;
text-align: center;
overflow: hidden;
}
.dead-loading-view {
opacity: 0;
transition-duration: 0.7s;
}
// ────────────────────────────────────────────────────────────────────────────────
\ No newline at end of file
//
// Copyright 2016 Kary Foundation, Inc.
// Author: Pouya Kary <k@karyfoundation.org>
//
//
// ─── IMPORTS ────────────────────────────────────────────────────────────────────
//
@import '../globals';
//
// ─── FONT LOADER ────────────────────────────────────────────────────────────────
//
@font-face {
font-family: @source-code-pro-typeface;
src: url('sourcecodepro-medium-webfont.woff2') format('woff2'),
url('sourcecodepro-medium-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
// ────────────────────────────────────────────────────────────────────────────────
\ No newline at end of file
//
// Copyright 2016 Kary Foundation, Inc.
// Author: Pouya Kary <k@karyfoundation.org>
//
//
// ─── IMPORTS ────────────────────────────────────────────────────────────────────
//
@import '../globals';
//
// ─── FONT LOADER ────────────────────────────────────────────────────────────────
//
@font-face {
font-family: @vogur-typeface;
src: url("Vegur-R_0_600.eot?") format("eot"),
url("Vegur-R_0_600.woff") format("woff"),
url("Vegur-R_0_600.ttf") format("truetype"),
url("Vegur-R_0_600.svg#Vegur-Regular") format("svg");
font-weight: normal;
font-style: normal;
}
// ────────────────────────────────────────────────────────────────────────────────
\ No newline at end of file
//
// Copyright 2016 Kary Foundation, Inc.
// Author: Pouya Kary <k@karyfoundation.org>
//
//
// ─── HEADER HEIGHT ──────────────────────────────────────────────────────────────
//
@header-height: 29px;
//
// ─── FONT NAMES ─────────────────────────────────────────────────────────────────
//
@source-code-pro-typeface: 'GraphSourceCodePro';
@vogur-typeface: 'GraphVegurLight';
//
// ─── GLOBALS ────────────────────────────────────────────────────────────────────
//
@color-1: @kary-light-background;
@color-2: white;
@color-3: @kary-light-foreground;
@color-4: @kary-light-blue;
@font-sans-serif: @vogur-typeface;
@base-font-size: 12px;
@mono-type: @source-code-pro-typeface;
@inspector-width: 298px;
//
// ─── SIZING ─────────────────────────────────────────────────────────────────────
//
@header-padding-top: 4px;
@icon-box-size: 30px;
@icon-size: 23px;
@active-icon-size: 28px;
@toolbar-padding-top: 10px;
@notebook-blue-color: @kary-light-blue;
@toolbar-tabs-width: 580px;
@ribbon-height: 70px;
// ────────────────────────────────────────────────────────────────────────────────
\ No newline at end of file
//
// Kary Foundation's Brand Color Scheme
// Copyright 2016 Kary Foundation, Inc - All Rights Reserved.
//
// IMPORTANT
// Premission to use this color scheme is ONLY granted for use within Kary
// Foundation Branded Projects. As a brand property you get no right to use
// this theme with any other project.
//
//
// ─── KARY FOUNDATION LIGHT ──────────────────────────────────────────────────────
//
@kary-light-orange: #B36D00;
@kary-light-red: #C03207;
@kary-light-magenta: #9F0D97;
@kary-light-blue: #2A75C0;
@kary-light-green: #317410;
@kary-light-foreground: #141414;
@kary-light-comment: #BBB7B5;
@kary-light-background: #F5F5F5;
@kary-light-selection: #C2E8F4;
@kary-light-highlights: #ECECEC;
//
// ─── KARY FOUNDATION DARK ───────────────────────────────────────────────────────
//
@kary-dark-orange: #B48337;
@kary-dark-red: #D17051;
@kary-dark-magenta: #A47097;
@kary-dark-blue: #668BB7;
@kary-dark-green: #6F985A;
@kary-dark-foreground: #C1C1C1;
@kary-dark-comment: #5D5D5D;
@kary-dark-background: #141414;
@kary-dark-selcetion: #1B424E;
@kary-dark-highlights: #1B1B1B;
// ────────────────────────────────────────────────────────────────────────────────
\ No newline at end of file
//
// Copyright 2016 Kary Foundation, Inc.
// Author: Pouya Kary <k@karyfoundation.org>
//
//
// ─── SCROLL BAR SIZES ───────────────────────────────────────────────────────────
//
@scroll-border: 4px;
@scroll-size: 5px;
//
// ─── SCROLL BAR ─────────────────────────────────────────────────────────────────
//
::-webkit-scrollbar {
width: @scroll-size + 2 * @scroll-border;
height: @scroll-size;
}
::-webkit-scrollbar-thumb {
height: @scroll-size;
border: @scroll-border solid rgba(0, 0, 0, 0);
background-clip: padding-box;
border-radius: @scroll-size;
background-color: rgba( 0, 0, 0, 0.1 );
}
::-webkit-scrollbar-buttom {
width: 0;
height: 0;
display: none;
}
::-webkit-scrollbar-corner {
background-color: transparent;
}
// ────────────────────────────────────────────────────────────────────────────────
\ No newline at end of file
//
// Copyright 2016 Kary Foundation, Inc.
// Author: Pouya Kary <k@karyfoundation.org>
//
//
// ─── INCLUDES ───────────────────────────────────────────────────────────────────
//
@import 'sheets/base';
@import 'sheets/globals';
@import 'sheets/scroll';
@import 'sheets/fonts/vegur';
@import 'sheets/fonts/source-code-pro';
@import 'sheets/views/tab-view';
@import 'sheets/views/regman-editor/view';
@import 'sheets/views/toolbar/toolbar';
@import 'sheets/views/toolbar/tabs';
@import 'sheets/views/toolbar/ribbon';
@import 'sheets/views/toolbar/ribbons/general';
// ────────────────────────────────────────────────────────────────────────────────
#regman-coding-view {
height: ~'calc( 100vh - 110px )';
}
\ No newline at end of file
//
// Copyright 2016 Kary Foundation, Inc.
// Author: Pouya Kary <k@karyfoundation.org>
//
//
// ─── INCLUDES ───────────────────────────────────────────────────────────────────