소스 검색

transform into a npm repository

pull/342/head
Guillaume Vincent 8 년 전
부모
커밋
9035bcd8d6
33개의 변경된 파일183개의 추가작업 그리고 481개의 파일을 삭제
  1. +2
    -1
      .gitignore
  2. +0
    -0
      dist/fontawesome-webfont.eot
  3. +0
    -0
      dist/fontawesome-webfont.svg
  4. +0
    -0
      dist/fontawesome-webfont.ttf
  5. +0
    -0
      dist/fontawesome-webfont.woff
  6. +0
    -0
      dist/fontawesome-webfont.woff2
  7. BIN
      dist/fonts/FontAwesome.otf
  8. +0
    -181
      dist/index.html
  9. +0
    -7
      dist/js/clipboard.min.js
  10. +0
    -3
      dist/js/lesspass.min.js
  11. +0
    -125
      dist/js/password-generator.js
  12. +2
    -0
      dist/lesspass-pure.css
  13. +1
    -0
      dist/lesspass-pure.css.map
  14. +19
    -0
      dist/lesspass-pure.js
  15. +1
    -0
      dist/lesspass-pure.js.map
  16. +12
    -0
      dist/lesspass-vendors.css
  17. +1
    -0
      dist/lesspass-vendors.css.map
  18. +2
    -0
      dist/lesspass-vendors.js
  19. +1
    -0
      dist/lesspass-vendors.js.map
  20. +0
    -6
      dist/styles/bootstrap.min.css
  21. +0
    -4
      dist/styles/font-awesome.min.css
  22. +0
    -5
      dist/styles/hint.min.css
  23. +0
    -1
      dist/styles/style.min.css
  24. +0
    -95
      gulpfile.js
  25. +6
    -8
      index.html
  26. +41
    -21
      package.json
  27. +9
    -0
      readme.md
  28. +3
    -1
      src/app.js
  29. +19
    -0
      src/app.scss
  30. +1
    -0
      src/vendors.js
  31. +3
    -0
      src/vendors.scss
  32. +0
    -23
      style.css
  33. +60
    -0
      webpack.config.js

+ 2
- 1
.gitignore 파일 보기

@@ -1 +1,2 @@
node_modules
dist
node_modules

dist/fonts/fontawesome-webfont.eot → dist/fontawesome-webfont.eot 파일 보기


dist/fonts/fontawesome-webfont.svg → dist/fontawesome-webfont.svg 파일 보기


dist/fonts/fontawesome-webfont.ttf → dist/fontawesome-webfont.ttf 파일 보기


dist/fonts/fontawesome-webfont.woff → dist/fontawesome-webfont.woff 파일 보기


dist/fonts/fontawesome-webfont.woff2 → dist/fontawesome-webfont.woff2 파일 보기


BIN
dist/fonts/FontAwesome.otf 파일 보기


+ 0
- 181
dist/index.html 파일 보기

@@ -1,181 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="styles/bootstrap.min.css">
<link rel="stylesheet" href="styles/font-awesome.min.css">
<link rel="stylesheet" href="styles/hint.min.css">
<link rel="stylesheet" href="styles/style.min.css">
</head>
<body>
<div id="passwordGenerator">
<div class="card">
<div id="password-block" class="card-block">
<form id="generatedPasswordForm">
<fieldset class="form-group">
<label for="login" class="sr-only">Login</label>
<input id="login"
name="login"
type="text"
class="form-control"
placeholder="Login"
autofocus
autocomplete="off"
autocorrect="off"
autocapitalize="none">
<!-- remove autofill for masterPassword -->
<input type="password" id="password" style="display: none">
</fieldset>
<fieldset class="form-group">
<label for="masterPassword" class="sr-only">Password</label>
<div class="input-group">
<input id="masterPassword"
name="masterPassword"
type="password"
class="form-control"
placeholder="Master password"
autocomplete="off"
autocorrect="off"
autocapitalize="none">
<span class="input-group-btn">
<a id="displayMasterPasswordButton" class="btn btn-secondary" type="button"
tabindex="-1">
<i class="fa fa-user-secret" aria-hidden="true"></i>
<small class="hint--top" id="fingerprint" aria-label="fingerprint"></small>
</a>
</span>
</div>
</fieldset>
<fieldset class="form-group">
<label for="site" class="sr-only">Site</label>
<input id="site"
name="site"
type="text"
class="form-control"
placeholder="Site"
autofocus
autocomplete="off"
autocorrect="off"
autocapitalize="none">
</fieldset>
<fieldset class="form-group">
<div class="input-group">
<span id="autoLoginButton" class="input-group-btn">
<button class="btn btn-secondary">
<i class="fa fa-magic" aria-hidden="true"></i>
</button>
</span>
<label for="generatedPassword" class="sr-only">Password Generated</label>
<input id="generatedPassword"
name="generatedPassword"
type="text"
class="form-control"
tabindex="-1"
readonly>
<span class="input-group-btn">
<button id="copyPasswordButton" class="btn-copy btn btn-primary" type="button"
data-clipboard-target="#generatedPassword">
<i class="fa fa-clipboard" aria-hidden="true"></i>
</button>
</span>
</div>
</fieldset>
<fieldset class="form-group m-b-0">
<span id="displayOptionsButton">
<i class="fa fa-gears"></i> Advanced options
</span>
</fieldset>
<fieldset class="form-group option-block m-t-1">
<div class="row">
<div class="col-xs-12">
<label>Password groups :</label>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<label class="c-input c-checkbox">
<input type="checkbox" id="lowercase" value="lowercase" name="lowercase"
checked>
<span class="c-indicator"></span> Lower letters (a‑z)
</label>
</div>
<div class="col-sm-6">
<label class="c-input c-checkbox">
<input type="checkbox" id="uppercase" value="uppercase" name="uppercase"
checked>
<span class="c-indicator"></span> Upper letters (A-Z)
</label>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<label class="c-input c-checkbox">
<input type="checkbox" id="numbers" value="numbers" name="numbers" checked>
<span class="c-indicator"></span> Numbers (0-9)
</label>
</div>
<div class="col-sm-6">
<label class="c-input c-checkbox">
<input type="checkbox" id="symbols" value="symbols" name="symbols" checked>
<span class="c-indicator"></span> Special chars (@&%)
</label>
</div>
</div>
</fieldset>
<fieldset class="form-group option-block">
<div class="row">
<div class="col-xs-6">
<label for="passwordLength">Length :</label>
<input id="passwordLength"
type="number"
class="form-control"
value="12"
min="6"
max="64"/>
</div>
<div class="col-xs-6">
<label for="passwordCounter">Counter :</label>
<input id="passwordCounter"
type="number" class="form-control"
value="1"
min="1"
max="1000"/>
</div>
</div>
</fieldset>
<!--
<fieldset class="form-group option-block">
<div class="row">
<div class="col-xs-12">
<label class="c-input c-checkbox">
<input type="checkbox" id="saveLocally" value="saveLocally" name="saveLocally">
<span class="c-indicator"></span> Save passwords info locally
</label>
</div>
</div>
</fieldset>
<fieldset class="form-group option-block">
<div class="row">
<div class="col-xs-6">
<button class="btn btn-success-outline btn-sm btn-block">
<i class="fa fa-download" aria-hidden="true"></i> download passwords info
</button>
</div>
<div class="col-xs-6">
<button class="btn btn-primary-outline btn-sm btn-block">
<i class="fa fa-upload" aria-hidden="true"></i> load passwords info
</button>
</div>
</div>
</fieldset>
-->
</form>
</div>
</div>
</div>
<script src="js/lesspass.min.js"></script>
<script src="js/clipboard.min.js"></script>
<script src="js/password-generator.js"></script>
</body>
</html>

+ 0
- 7
dist/js/clipboard.min.js
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 0
- 3
dist/js/lesspass.min.js
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 0
- 125
dist/js/password-generator.js 파일 보기

@@ -1,125 +0,0 @@
function showTooltip(elem, msg) {
var classNames = elem.className;
elem.setAttribute('class', classNames + ' hint--top');
elem.setAttribute('aria-label', msg);
setTimeout(function () {
elem.setAttribute('class', classNames);
}, 2000);
}

window.onload = function () {
document.getElementById('generatedPassword').value = '';
};

function getColor(color) {
var colors = ['EBBB56', '59E0EB', 'E8F464', 'D2B4ED', 'BBE96D', 'EF9FC8', '8EE083', 'DCBFD6', 'DDD15A', 'A1C8E8', 'C4D977', 'F1A49E', '79E8A0', 'E9A970', '60E3B4', 'D4C47D', '73DDCA', 'C4EAA7', 'A7D6D4', '9CC795'];
var index = parseInt(color, 16) % colors.length;
return '#' + colors[index];
}

document.getElementById('login').onblur = displayPasswordIndication;
document.getElementById('masterPassword').onblur = displayPasswordIndication;
function displayPasswordIndication() {
var login = document.getElementById('login').value;
var masterPassword = document.getElementById('masterPassword').value;
var fingerprint = document.getElementById('fingerprint');
var displayMasterPasswordButton = document.getElementById('displayMasterPasswordButton');
if (!login || !masterPassword) {
fingerprint.innerText = '';
fingerprint.style.display = 'none';
displayMasterPasswordButton.style.backgroundColor = '#FFFFFF';
return;
}
lesspass.encryptLogin(login, masterPassword).then(function (secretHash) {
var color = secretHash.substring(0, 6);
var colorHex = getColor(color);
fingerprint.innerText = color;
fingerprint.style.display = 'inline';
displayMasterPasswordButton.style.backgroundColor = colorHex;
});
}


document.getElementById('copyPasswordButton').addEventListener('click', generatePassword);
document.getElementById('generatedPasswordForm').addEventListener('change', generatePassword);
document.getElementById('passwordLength').addEventListener('input', generatePassword);
document.getElementById('passwordCounter').addEventListener('input', generatePassword);

function getData() {
const defaultOptions = {
login: document.getElementById('login').value,
counter: document.getElementById('passwordCounter').value,
password: {
length: document.getElementById('passwordLength').value,
settings: []
}
};
const options = ['lowercase', 'uppercase', 'numbers', 'symbols'];

for (let i = 0; i < options.length; i++) {
if (document.getElementById(options[i]).checked) {
defaultOptions.password.settings.push(options[i]);
}
}
return defaultOptions;
}

function getFormData() {
const initData = getData();
initData.masterPassword = document.getElementById('masterPassword').value;
initData.site = document.getElementById('site').value;
return initData;
}

function generatePassword() {
const data = getFormData();
var generatedPasswordField = document.getElementById('generatedPassword');
if (!data.login || !data.masterPassword || !data.site || !data.password.settings.length) {
generatedPasswordField.value = '';
return;
}
lesspass.generatePassword(data.login, data.masterPassword, data.site, data).then(function (generatedPassword) {
generatedPasswordField.value = generatedPassword;
});
}


document.getElementById('displayMasterPasswordButton').addEventListener('click', toggleMasterPassword);
function toggleMasterPassword() {
if (document.getElementById('masterPassword').type == 'password') {
document.getElementById('masterPassword').type = 'text';
} else {
document.getElementById('masterPassword').type = 'password';
}
}


var clipboard = new Clipboard('.btn-copy');

clipboard.on('success', function (e) {
if (e.text) {
showTooltip(e.trigger, 'copied !');
e.clearSelection();
}
});
clipboard.on('error', function (e) {
});


document.getElementById('displayOptionsButton').addEventListener('click', toggleBlocks);

function toggle_visibility(className) {
var elements = document.getElementsByClassName(className);
for (var i = 0; i < elements.length; i++) {
var e = elements[i];
if (e.style.display == 'block') {
e.style.display = 'none';
} else {
e.style.display = 'block';
}
}
}

function toggleBlocks() {
toggle_visibility('option-block');
}

+ 2
- 0
dist/lesspass-pure.css 파일 보기

@@ -0,0 +1,2 @@
*{border-radius:0!important}i{cursor:pointer}#autoLoginButton,#fingerprint,.option-block{display:none}#displayOptionsButton{cursor:pointer}.card{border:none}
/*# sourceMappingURL=lesspass-pure.css.map*/

+ 1
- 0
dist/lesspass-pure.css.map 파일 보기

@@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","file":"lesspass-pure.css","sourceRoot":""}

+ 19
- 0
dist/lesspass-pure.js
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 1
- 0
dist/lesspass-pure.js.map
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 12
- 0
dist/lesspass-vendors.css
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 1
- 0
dist/lesspass-vendors.css.map 파일 보기

@@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","file":"lesspass-vendors.css","sourceRoot":""}

+ 2
- 0
dist/lesspass-vendors.js 파일 보기

@@ -0,0 +1,2 @@
!function(t){function r(n){if(e[n])return e[n].exports;var o=e[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}var e={};return r.m=t,r.c=e,r.p="/dist/",r(0)}({0:function(t,r,e){"use strict";e(17)},17:function(t,r){}});
//# sourceMappingURL=lesspass-vendors.js.map?d85e4fdbb5fb35c32626

+ 1
- 0
dist/lesspass-vendors.js.map 파일 보기

@@ -0,0 +1 @@
{"version":3,"sources":["webpack:///lesspass-vendors.js","webpack:///webpack/bootstrap d85e4fdbb5fb35c32626?bab7","webpack:///./src/vendors.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","0","17"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,QAAA,EAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,SAGAV,EAAA,KDMMW,EACA,SAASP,EAAQD,EAASH,GAE/B,YE/CDA,GAAA,KFqDMY,GACA,SAASR,EAAQD","file":"lesspass-vendors.js?d85e4fdbb5fb35c32626","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/dist/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\t__webpack_require__(17);\n\n/***/ },\n\n/***/ 17:\n/***/ function(module, exports) {\n\n\t// removed by extract-text-webpack-plugin\n\n/***/ }\n\n/******/ });\n\n\n/** WEBPACK FOOTER **\n ** lesspass-vendors.js?d85e4fdbb5fb35c32626\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap d85e4fdbb5fb35c32626\n **/","import './vendors.scss'\n\n\n/** WEBPACK FOOTER **\n ** ./src/vendors.js\n **/"],"sourceRoot":""}

+ 0
- 6
dist/styles/bootstrap.min.css
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 0
- 4
dist/styles/font-awesome.min.css
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 0
- 5
dist/styles/hint.min.css
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 0
- 1
dist/styles/style.min.css 파일 보기

@@ -1 +0,0 @@
*{border-radius:0!important}i{cursor:pointer}#autoLoginButton,.option-block{display:none}#displayOptionsButton{cursor:pointer}.card{border:none}#fingerprint{display:none}

+ 0
- 95
gulpfile.js 파일 보기

@@ -1,95 +0,0 @@
'use strict';

var gulp = require('gulp');
var del = require('del');
var concat = require('gulp-concat');
var autoprefixer = require('gulp-autoprefixer');
var minifyCss = require('gulp-cssnano');

var paths = {
build: 'dist/',
html: [
'index.html'
],
js: [
'password-generator.js'
],
jsVendors: [
'node_modules/lesspass/dist/lesspass.min.js',
'node_modules/clipboard/dist/clipboard.min.js'
],
styles: [
'style.css'
],
stylesVendors: [
'node_modules/bootstrap/dist/css/bootstrap.min.css',
'node_modules/font-awesome/css/font-awesome.min.css',
'node_modules/hint.css/hint.min.css'
],
images: [
'images/**/*'
],
fonts: [
'node_modules/font-awesome/fonts/**/*'
]
};

gulp.task('clean', function (callback) {
return del(paths.build, {force: true}, callback);
});

gulp.task('fonts', [], function () {
return gulp.src(paths.fonts)
.pipe(gulp.dest(paths.build + 'fonts/'));
});

gulp.task('images', function () {
return gulp.src(paths.images)
.pipe(gulp.dest(paths.build + 'images/'));
});

gulp.task('html', function () {
return gulp.src(paths.html)
.pipe(gulp.dest(paths.build));
});

gulp.task('styles', function () {
return gulp.src(paths.styles)
.pipe(concat('style.min.css'))
.pipe(autoprefixer('last 2 versions'))
.pipe(minifyCss())
.pipe(gulp.dest(paths.build + '/styles'));
});

gulp.task('stylesVendors', function () {
return gulp.src(paths.stylesVendors)
.pipe(gulp.dest(paths.build + 'styles/'));
});

gulp.task('js', function () {
return gulp.src(paths.js)
.pipe(gulp.dest(paths.build + 'js/'));
});

gulp.task('jsVendors', function () {
return gulp.src(paths.jsVendors)
.pipe(gulp.dest(paths.build + 'js/'));
});

gulp.task('build', ['clean'], function () {
gulp.start('js', 'jsVendors', 'html', 'styles', 'stylesVendors', 'fonts', 'images');
});

gulp.task('watch', ['build'], function () {
gulp.watch(paths.js, ['js']);
gulp.watch(paths.jsVendors, ['jsVendors']);
gulp.watch(paths.styles, ['styles']);
gulp.watch(paths.stylesVendors, ['stylesVendors']);
gulp.watch(paths.html, ['html']);
gulp.watch(paths.images, ['images']);
gulp.watch(paths.fonts, ['fonts']);
});

gulp.task('default', ['watch'], function () {

});

+ 6
- 8
index.html 파일 보기

@@ -2,11 +2,10 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="styles/bootstrap.min.css">
<link rel="stylesheet" href="styles/font-awesome.min.css">
<link rel="stylesheet" href="styles/hint.min.css">
<link rel="stylesheet" href="styles/style.min.css">
<title>lesspass</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="dist/lesspass-vendors.css">
<link rel="stylesheet" href="dist/lesspass-pure.css">
</head>
<body>
<div id="passwordGenerator">
@@ -174,8 +173,7 @@
</div>
</div>
</div>
<script src="js/lesspass.min.js"></script>
<script src="js/clipboard.min.js"></script>
<script src="js/password-generator.js"></script>
<script src="dist/lesspass-vendors.js"></script>
<script src="dist/lesspass-pure.js"></script>
</body>
</html>

+ 41
- 21
package.json 파일 보기

@@ -1,32 +1,52 @@
{
"name": "lesspass-pure",
"version": "1.0.0",
"author": "Guillaume Vincent <guillaume@oslab.fr>",
"description": "lesspass web component built with webpack",
"main": "src/app.js",
"scripts": {
"build": "gulp build",
"build:watch": "gulp",
"test": "xo"
"dev": "webpack-dev-server",
"build": "rm -rf dist && NODE_ENV=production webpack",
"prepublish": "npm run build"
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com:lesspass/pure.git"
},
"engines": {
"node": ">=4.2.6"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/lesspass/pure/issues"
},
"homepage": "https://github.com/lesspass/pure#readme",
"dependencies": {
"lesspass": "^3.1.3"
},
"devDependencies": {
"bootstrap": "^4.0.0-alpha.2",
"clipboard": "^1.5.12",
"font-awesome": "^4.6.3",
"hint.css": "^2.3.1",
"lesspass": "^3.1.3"
},
"devDependencies": {
"del": "^2.2.1",
"gulp": "^3.9.1",
"gulp-autoprefixer": "^3.1.0",
"gulp-concat": "^2.6.0",
"gulp-cssnano": "^2.1.2",
"xo": "^0.16.0"
"babel-core": "^6.10.4",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.9.0",
"css-loader": "^0.23.1",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.9.0",
"html-webpack-plugin": "^2.22.0",
"node-sass": "^3.8.0",
"sass-loader": "^4.0.0",
"style-loader": "^0.13.1",
"url-loader": "^0.5.7",
"webpack": "^1.13.1",
"webpack-dev-server": "^1.14.1"
},
"xo": {
"space": true,
"envs": [
"browser",
"webextensions"
"babel": {
"presets": [
"es2015"
],
"ignores": [
"dist/**"
]
"comments": false
}
}
}

+ 9
- 0
readme.md 파일 보기

@@ -4,6 +4,15 @@ LessPass pure html, js and css component used in the web extension and the front

![LessPass Component](screenshot.png?raw=true "Demo")

# Install

npm install lesspass-pure

# Test

npm run dev

open [http://localhost:8080/](http://localhost:8080/)

# Build



password-generator.js → src/app.js 파일 보기

@@ -1,4 +1,6 @@
/* global lesspass Clipboard */
import './app.scss'
import lesspass from 'lesspass';
import Clipboard from 'clipboard';

function showTooltip(elem, msg) {
var classNames = elem.className;

+ 19
- 0
src/app.scss 파일 보기

@@ -0,0 +1,19 @@
* {
border-radius: 0 !important;
}

i {
cursor: pointer;
}

.option-block, #autoLoginButton, #fingerprint {
display: none;
}

#displayOptionsButton {
cursor: pointer;
}

.card {
border: none;
}

+ 1
- 0
src/vendors.js 파일 보기

@@ -0,0 +1 @@
import './vendors.scss'

+ 3
- 0
src/vendors.scss 파일 보기

@@ -0,0 +1,3 @@
@import "~bootstrap/dist/css/bootstrap.css";
@import "~font-awesome/css/font-awesome.css";
@import "~hint.css/hint.css";

+ 0
- 23
style.css 파일 보기

@@ -1,23 +0,0 @@
* {
border-radius: 0 !important;
}

i {
cursor: pointer;
}

.option-block, #autoLoginButton {
display: none;
}

#displayOptionsButton {
cursor: pointer;
}

.card {
border: none;
}

#fingerprint {
display: none;
}

+ 60
- 0
webpack.config.js 파일 보기

@@ -0,0 +1,60 @@
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require("extract-text-webpack-plugin");

module.exports = {
entry: {
pure: "./src/app",
vendors: "./src/vendors"
},
output: {
path: 'dist',
publicPath: '/dist/',
filename: 'lesspass-[name].js?[hash]'
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
},
{
test: /\.(png|jpg|gif|svg|woff2?|eot|ttf)(\?.*)?$/,
loader: 'url-loader',
query: {
limit: 10000,
name: '[name].[ext]?[hash]'
}
},
{
test: /\.css$/,
loader: ExtractTextPlugin.extract("style-loader", "css-loader")
},
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract("style-loader", "css-loader!sass-loader")
}
]
},
plugins: [
new ExtractTextPlugin("lesspass-[name].css")
]
};

if (process.env.NODE_ENV === 'production') {
module.exports.devtool = '#source-map';
module.exports.plugins = (module.exports.plugins || []).concat([
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}),
new webpack.optimize.OccurenceOrderPlugin()
]);
}

불러오는 중...
취소
저장