Merge Request #43
← To merge requests
From
skin-check
into
master
Skin structure - Folder organization + Validation
Commits (3)
-
Fix language to: an error message
-
IMHO this sounds better: throw new Error('The skin "'+skin+'" was not found in "'+skinPath+'"');
-
mentioned in commit e5ab24c7d52e0362edee5ce25b7ca50ecd5c4124
started a discussion on commit
3a1d52ef
started a discussion on commit
3a1d52ef
README.md
62 | 64 | } |
63 | 65 | ``` |
64 | 66 | - Configure application to use the new theme, e.g.: |
65 | -`npm config set angular-theme:skin custom-skin` | |
67 | +`npm config set angular-theme:skin skin-myscustom` | |
66 | 68 | |
67 | 69 | - Start the application with `npm start` scripts ou make a build |
70 | + > **PS:** If the configured skin is invalid, a error message is showed in the terminal. | |
1 |
|
started a discussion on commit
3a1d52ef
gulp/conf.js
42 | +* Check if skin file exists on "{theme}/app/layout/skins" directory | |
43 | +* | |
44 | +* @param skin The skin name passed by arg to gulp task | |
45 | +*/ | |
46 | +exports.skinExists = function (skin) { | |
47 | + var skinFile = skin+'.scss'; | |
48 | + if(/skin-/.test(skin)){ | |
49 | + skinFile = skin.replace('skin-','_')+'.scss'; | |
50 | + } | |
51 | + | |
52 | + var skinPath = path.join(exports.paths.themes, exports.paths.theme, '/app/layout/skins/', skinFile); | |
53 | + | |
54 | + try { | |
55 | + fs.statSync(skinPath); | |
56 | + }catch(e) { | |
57 | + throw new Error('The skin "'+skin+'" on path "'+skinPath+'" was not found'); | |
1 |
|