mirror of
https://github.com/FortAwesome/Font-Awesome.git
synced 2025-01-13 08:40:28 +08:00
Create index.js
Allow getting include paths from within node so can be used in build tools
This commit is contained in:
parent
c6304f5f7d
commit
cf43e98c0b
28
index.js
Normal file
28
index.js
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
var path = require('path');
|
||||||
|
var entryPoint = require.resolve('font-awesome');
|
||||||
|
|
||||||
|
var faDir = path.dirname(entryPoint);
|
||||||
|
|
||||||
|
var sassDir = path.join(faDir, 'scss');
|
||||||
|
var lessDir = path.join(faDir, 'less');
|
||||||
|
var cssDir = path.join(faDir, 'css');
|
||||||
|
var fontDir = path.join(faDir, 'fonts', '*');
|
||||||
|
|
||||||
|
function includePaths() {
|
||||||
|
return {
|
||||||
|
scss: sassDir,
|
||||||
|
less: sassDir,
|
||||||
|
css: cssDir,
|
||||||
|
fonts: fontDir
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
|
||||||
|
scssPath: includePaths().scss,
|
||||||
|
lessPath: includePaths().less,
|
||||||
|
cssPath: includePaths().css,
|
||||||
|
|
||||||
|
fontPath: includePaths().fonts,
|
||||||
|
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user