Removed NPM from build process
The base theme needs to be vanilla so it's easy to get going, so npm dependecies have been removed so the base script is pure JS. Also created an example config that will tell the system what theme it should be rendering for development. Updated the composer script to start a local php server for development.develop
parent
98ccdb978c
commit
0799250b8e
@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "fipamo-theme-kit",
|
||||
"version": "1.0.0",
|
||||
"current_theme": "fipamo-default"
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,26 +0,0 @@
|
||||
{
|
||||
"name": "fipamo-theme-kit",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"parcel": "^2.2.1",
|
||||
"sass": "^1.49.0"
|
||||
},
|
||||
"scripts": {
|
||||
"watch": "npx parcel watch $npm_package_config_theme_path/com/ThemeStart.js --dist-dir $npm_package_config_theme_dir/assets/scripts --public-url /assets/scripts ",
|
||||
"build": "npx parcel build $npm_package_config_theme_path/com/ThemeStart.js --dist-dir $npm_package_config_theme_dir/assets/scripts --public-url /assets/scripts",
|
||||
"dev": "php -S localhost:$npm_package_config_port"
|
||||
},
|
||||
"license": "UNLICENSED",
|
||||
"config": {
|
||||
"port": "1414",
|
||||
"current_theme": "fipamo-default",
|
||||
"theme_path": "src/themes/theme-fipamo-default",
|
||||
"theme_dir": "src/themes/theme-fipamo-default/fipamo-default"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@parcel/transformer-sass": "^2.2.1",
|
||||
"stylelint": "^14.14.0",
|
||||
"stylelint-config-standard": "^29.0.0"
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
import Base from "./Base.js";
|
||||
|
||||
document.addEventListener(
|
||||
"DOMContentLoaded",
|
||||
function () {
|
||||
var base = new Base();
|
||||
},
|
||||
false
|
||||
);
|
@ -1,2 +1,9 @@
|
||||
(()=>{class e{constructor(){this.currentSlide=0,this.slides=document.querySelectorAll('[role="slide"]'),this.start()}start(){this.slides.length>1&&(this.slideInterval=setInterval((()=>{this.slides[this.currentSlide].className="hide",this.currentSlide=(this.currentSlide+1)%this.slides.length,this.slides[this.currentSlide].className="show"}),3e3))}}document.addEventListener("DOMContentLoaded",(function(){new e}),!1)})();
|
||||
//# sourceMappingURL=ThemeStart.js.map
|
||||
import Base from "./Base.js";
|
||||
|
||||
document.addEventListener(
|
||||
"DOMContentLoaded",
|
||||
function () {
|
||||
var base = new Base();
|
||||
},
|
||||
false
|
||||
);
|
||||
|
@ -1 +0,0 @@
|
||||
{"mappings":"4BAKIA,KAAKC,aAAe,EACpBD,KAAKE,OAASC,SAASC,iBAAiB,kBAExCJ,KAAKK,QAEPA,QACML,KAAKE,OAAOI,OAAS,IACvBN,KAAKO,cAAgBC,aAAW,KAC9BR,KAAKE,OAAOF,KAAKC,cAAcQ,UAAY,OAC3CT,KAAKC,cAAgBD,KAAKC,aAAe,GAAKD,KAAKE,OAAOI,OAC1DN,KAAKE,OAAOF,KAAKC,cAAcQ,UAAY,SAC1C,OCdTN,SAASO,iBACP,oBACA,WACa,IAAIC,KAEjB","sources":["src/themes/theme-fipamo-default/com/Base.js","src/themes/theme-fipamo-default/com/ThemeStart.js"],"sourcesContent":["export default class Base {\n //--------------------------\n // constructor\n //--------------------------\n constructor() {\n this.currentSlide = 0;\n this.slides = document.querySelectorAll('[role=\"slide\"]');\n //alert(\"FRESH\");\n this.start();\n }\n start() {\n if (this.slides.length > 1) {\n this.slideInterval = setInterval(() => {\n this.slides[this.currentSlide].className = \"hide\";\n this.currentSlide = (this.currentSlide + 1) % this.slides.length;\n this.slides[this.currentSlide].className = \"show\";\n }, 3000);\n }\n }\n //--------------------------\n // methods\n //--------------------------\n\n //--------------------------\n // event handlers\n //--------------------------\n}\n","import Base from \"./Base.js\";\n\ndocument.addEventListener(\n \"DOMContentLoaded\",\n function () {\n var base = new Base();\n },\n false\n);\n"],"names":["this","currentSlide","slides","document","querySelectorAll","start","length","slideInterval","setInterval","className","addEventListener","$b8d4b81eabebe07b$export$2e2bcd8739ae039"],"version":3,"file":"ThemeStart.js.map"}
|
Loading…
Reference in New Issue