🚀 feat: Add Parcel

This commit is contained in:
沈宇 2020-03-02 13:55:29 +08:00
parent 196253f025
commit bc0119d821
44 changed files with 39 additions and 14206 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@
yarn.lock yarn.lock
package-lock.json package-lock.json
node_modules/ node_modules/
.cache
# Setting # Setting
_config.yml _config.yml

View File

@ -23,7 +23,7 @@
<% if (theme.favicon){ %> <% if (theme.favicon){ %>
<link rel="shortcut icon" href="<%- theme.favicon %>" /> <link rel="shortcut icon" href="<%- theme.favicon %>" />
<% } %> <% } %>
<%- css('css/style') %> <%- css('css/main') %>
<%- js('/js/pace.min.js') %> <%- js('/js/pace.min.js') %>
<%- partial('google-analytics') %> <%- partial('google-analytics') %>

View File

@ -1,20 +1,30 @@
{ {
"name": "ayer", "name": "ayer",
"version": "1.0.0", "version": "1.0.0",
"description": "ayer 是一个轻量优雅的 Hexo 主题", "description": "a clean and elegant theme for hexo.",
"main": "index.js",
"dependencies": {
"stylint": "^2.0.0"
},
"devDependencies": {},
"scripts": { "scripts": {
"test": "stylint source/css/style.styl -c .stylintrc" "dev": "parcel serve source-src/main.js -d source/css",
"build": "parcel build source-src/main.js -d source/css --no-source-maps"
},
"source": "source-src/main.js",
"repository": {
"type": "git",
"url": "git+https://github.com/Shen-Yu/hexo-theme-ayer.git"
}, },
"keywords": [ "keywords": [
"ayer",
"hexo", "hexo",
"light" "theme",
"blog",
"ayer"
], ],
"author": "shenyu", "author": "Shen-Yu",
"license": "ISC" "license": "MIT License",
"bugs": {
"url": "https://github.com/Shen-Yu/hexo-theme-ayer/issues"
},
"homepage": ".",
"devDependencies": {
"parcel-bundler": "^1.12.4"
},
"dependencies": {}
} }

View File

@ -10,7 +10,7 @@
*/ */
// variables // variables
remixicon-font-path = 'remixicon/' !default; remixicon-font-path = 'https://cdn.jsdelivr.net/npm/remixicon@2.1.0/fonts/' !default;
@font-face @font-face
font-family: remixicon; font-family: remixicon;

1
source-src/main.js Normal file
View File

@ -0,0 +1 @@
import './css/style.styl'

1
source/css/main.css Normal file

File diff suppressed because one or more lines are too long

5
source/css/main.js Normal file
View File

@ -0,0 +1,5 @@
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"MiQR":[function(require,module,exports) {
},{}],"epB2":[function(require,module,exports) {
"use strict";require("./css/style.styl");
},{"./css/style.styl":"MiQR"}]},{},["epB2"], null)

Binary file not shown.

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 868 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 654 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.